WorksheetsTest10
Total questions: 30
Worksheet time: 30mins
What is the output of this code?
1
2
None
Error
What is the result of 5 % 2 * 3 // 2?
0
1
2
3
What is the output of the following code?
0
1
None
Error
What will be the result of:
'36'
'336'
'333*2'
'3336'
What will this print?
True
False
"True"
Error
Which values are falsy in Python?
""
[]
None
"False"
How many times will "Hi" be printed?
3
4
Infinite
0
What is the result of this?
1
2
TypeError
None
What will this code do?
Yes
No
Error
Nothing
What is the output?
1 2 3 4
1 3
2 4
1 3 5
What happens here?
5
0
Error
None
What does x = [None] * 3 create?
Empty list
List with 3 Nones
List with 1 None
Syntax error
Which list methods modify the list in place?
append()
sort()
+
insert()
What is the output?
[1] and [1]
[1] and [1, 1]
[1] and []
Error
What will this print?
True
False
0
Error
What is the output?
True
False
Error
None
Which of these are valid slices for s = "abcdef"?
s[::2]
s[-1:2]
s[:100]
s[2:2]
What is the result of:
True
False
None
Error
Which of the following statements are true about functions in Python?
A function must return a value
A function can return nothing
A function must take at least one parameter
A function must use return
What does this print?
[1, 2, 3]
[1, 2]
Error
None
What is the output?
[1, 2]
[1, 2, 3]
Error
None
What is the result of:
True
False
None
Error
Which operator has higher precedence?
and
or
not
==
What does this code print?
[]
[1, 2, 3]
None
Error
What will be the result?
1
2
Error
None
What happens here?
3
-1
Error
1
What does None == False return?
True
False
None
Error
What will be the output?
1
True
False
0
Which of these is not a valid string method?
split()
strip()
pop()
find()
What will this print?
"c"
""
"abc"
Error
