Computers and Technology

Question 1 A programmer is writing class scheduling software to be used by a small school. She is deciding what type of variables should be used to store the classroom buildings, which are called A, B, C, and D. This is a question of the of data.
Group of answer choices

storage

security

representation

transmission

Question 2

What is the purpose of \n in this line of code?

flavors. write(item+"\n")

Group of answer choices

It writes each item on a separate line.

It adds the character n to the end of each item.

It prints out a new line on the console.

It opens a new file.

Question 3

Which data type should be used for a variable that will store a student’s grade point average, which includes numbers such as 2.985 and 3.100?

Boolean

float

integer

string

Question 4

Which of these characterizes a procedural program?

print("What is your name?")

class Name:

def __init__(self, name):

self. name = name

name = input("What is your name?")

def inputName():

name = input("What is your name?")

return name

Question 5

The is responsible for allowing or denying access to RAM.

DVD

OS

ROM

USB

Question 6

In Python, the data type of a variable must be declared before the variable is used.

True

False

Question 7

Which of these is the correct first line of code for the creation of a class called Athletes?

class(Athletes)

new Athletes:

create Athletes:

class Athletes:

Question 8

Which of these lines of code is an example of a method?

self. double = double

return Double

class Double:

double()

Question 9

A class called Car has two identical objects called firstTruck and secondTruck but no __eq__ method. What is the output of this line of code?

print(firstTruck == secondTruck)

False

an error message

True

firstTruck == secondTruck

Question 10
A stack overflow occurs when:

too much data is put in a heap.

too many heaps are put in a stack.

too much data is put in a stack.

too many stacks are put in a heap.

Question 11:

Which function is used in every Python class to initialize the attributes of new objects?

__class__

__new__

__init__

__create__

Question 12

Declaring a variable as an object instead of a primitive data type saves space.

True

False

Question 13

Usually, a contains primitive data types, and a contains non-primitive data types.

RAM; ROM

ROM; RAM

stack; heap

heap; stack

Question 14

A(n) is a variable inside of a function or method definition, and a(n) is the variable or data in a function call.

argument; parameter

parameter; argument

return; initializer

initializer; return

Question 15

In Python, when a file is opened using a with statement, the file will be later closed automatically.

False

True

Question 16

Which of these is an example of the content of a CSV file?

“Yellow, Orange, Blue”

yellow, orange, blue

Question One: [yellow], [orange], [blue]

0100 1111 1101

Question 17

Primary memory is known as ROM.

True

False

Question 18

What is the output of this program?

def addFive(a):

a = a + 5

return a

myNum = 10

print(addFive(myNum), myNum)

15 15

10 5

5 10

15 10

Question 19

Which data type should be used for a variable that will store the user’s year of birth?

float

string

object

integer

Question 20

Which of these statements is the correct way to define the method that will compare two instances of a class to see if their attributes are the same?

if self == other:

def __eq__(self, other):

def compare(self, other):

check self == other:

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:30, 341404143
Ted wants to go out to a neighborhood park and shoot pictures of dew drops on grass. he wants to get a low-level angle of the dew drops. which support equipment should ted use? a. mini tripod b. pistol grip c. monopod d. body mount
Answers: 2
image
Computers and Technology, 22.06.2019 09:50, shadow29916
What is a rush associated with alcohol?
Answers: 1
image
Computers and Technology, 22.06.2019 17:00, hollodom9654
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen tool
Answers: 1
image
Computers and Technology, 23.06.2019 03:10, kyleereeves2007
Acomputer has a two-level cache. suppose that 60% of the memory references hit on the first level cache, 35% hit on the second level, and 5% miss. the access times are 5 nsec, 15 nsec, and 60 nsec, respectively, where the times for the level 2 cache and memory start counting at the moment it is known that they are needed (e. g., a level 2 cache access does not even start until the level 1 cache miss occurs). what is the average access time?
Answers: 1
Do you know the correct answer?
Question 1 A programmer is writing class scheduling software to be used by a small school. She is...

Questions in other subjects:

Konu
English, 08.12.2020 02:30
Konu
Physics, 08.12.2020 02:30
Konu
Mathematics, 08.12.2020 02:30
Konu
Mathematics, 08.12.2020 02:30
Konu
Biology, 08.12.2020 02:30