<
RHD
/>
Home
Blog
Quiz
Resources
About
Contact
// guest
▾
Login
Request Account
[ light ]
// general
General Quiz
// question 1 of 10
What is printed? a=[1,2,3]
[3,2,1]
a.reverse()
print(a)
// question 2 of 10
When should you call super().__init__()?
Never because Python calls it automatically
Always in the child class __init__ to run the parent constructor
Only when the parent has no __init__
// question 3 of 10
What does except ZeroDivisionError do?
Handles all errors
Ignores errors
Handles division by zero
// question 4 of 10
What is the result of ""python""[0:2]?
yo
py
pt
// question 5 of 10
What happens if you call pop() on a dictionary with a key that doesn't exist?
It removes a random key
It returns None
It raises a KeyError
// question 6 of 10
What is printed? for i in range(3): print(i * ""*"")?
blank * **
0 1 2
*** ** *
// question 7 of 10
What is the purpose of newline="" when writing a CSV file?
Adds a blank line between rows
Prevents double newlines between rows
Removes all newlines from content
// question 8 of 10
What is printed? print(type(True))?
bool
<class 'bool'>
True
// question 9 of 10
What is printed? for i in range(3): break?
Error
Nothing
0
// question 10 of 10
What does x += 1 do?
Adds 1 to x
Resets x
Subtracts 1 from x
Submit Answers →