WorksheetsReviewer Computer 9 - 4th Quarter
Total questions: 20
Worksheet time: 10mins
Which of the following utilizes the flowchart symbol below?
I/O box
Process capsule
Terminal interrupt
Connectors
Which of the following utilizes the flowchart symbol below?
I/O box
Process box
Program interrupt
Connectors
Who conceptualized Python?
ABC
Guido Van Rossum
Linux
Seymour Papert
Which of the following designs and architectures was not influenced by Python?
Cobra
CoffeeScript
Apple’s Shift
Apple’s Swift
What type of identifier is i_do_not_know?
valid
Keyword
invalid
i_do_not_know
What symbol is used to insert comments in Python?
//
/* */
/*
#
What is the output of the program below?
Error message
Programming
Python
var
What is the data type of 3.143?
int
string
float
char
What is the output of the program below?
True
Error message
False
79
Which of the following statements assigns the value 100 to the variable x in Python?
x <-- 100
let x = 100
x << 100
x = 100
What is the maximum possible length of an identifier?
31 characters
63 characters
79 characters
Identifiers can be of any length.
Why are local variable names beginning with an underscore discouraged to be used as a variable name?
They are used to indicate a private variable of a class.
They confuse the interpreter.
They are used to indicate global variables.
They slow down execution.
Which of the following is not a keyword?
eval
nonlocal
assert
pass
Which of the following is true for variable names in Python?
Variable names can be of any length.
All private members must have leading and trailing underscores.
Underscore and ampersand are the only two special characters allowed.
limited length names for variable.
What will be the output of the following Python code?
d1 = {"john":40, "peter":45}
d2 = {"john":466, "peter":45}
d1 == d2
True
john: 466, peter: 45
False
Error
Which of the following is a Python tuple?
[1, 2, 3]
(1, 2, 3)
{1, 2, 3}
{ }
Suppose t = (1, 2, 4, 3), which of the following is incorrect?
print(t[3])
print(len(t))
print(max(t))
t[3] = 45
What will be the output of the following Python code?
>>>t=(1, 2, 4, 3)
>>>t[1:3]
(1, 2)
(2, 4)
(1, 2, 4)
(2, 4, 3)
Which of following is not true about a set?
Mutable data type
Allows duplicate values.
Data type with unordered values.
Immutable data type
What will be the output of the following Python code?
>>>t=(1, 2, 4, 3, 8, 9)
>>>[t[i] for i in range (0, len(t), 2)]
[2, 3, 9]
[1, 2, 4, 3, 8, 9]
[1, 4, 8]
(1, 4, 8)
