<
RHD
/>
Home
Blog
Quiz
Resources
About
Contact
Enlist
// guest
▾
Login
Request Account
[ light ]
// general
General Quiz
// question 1 of 10
What does time.perf_counter() measure?
The current time of day
High-resolution elapsed time
The CPU temperature
// question 2 of 10
What is printed? print(type({}))
<class 'dict'>
<class 'set'>
<class 'list'>
// question 3 of 10
What is the risk of using a mutable default argument in __init__?
It raises a TypeError when the object is created
It is shared across all instances that do not pass their own value
It prevents the class from being subclassed
// question 4 of 10
What does vars(obj) return?
The class attributes shared by all instances
A dictionary of the object's instance attributes
A list of the object's methods
// question 5 of 10
What is printed? for i in range(4): print(i*i)?
0 1 4 9
0 1 2 3
1 4 9 16
// question 6 of 10
What does statistics.median([1 5 9]) return?
1
9
5
// question 7 of 10
What does classmethod decorator do?
Makes a method receive the class as first argument instead of an instance
Makes a method run automatically at import
Makes a method private
// question 8 of 10
What is printed? while 1<2: break?
Error
Nothing
True
// question 9 of 10
What does os.path not provide in this course?
It was not covered in this course
File reading functions
Dictionary operations
// question 10 of 10
What is method overriding?
A child class redefining a method from the parent class
Calling a method with different arguments
Defining two methods with the same name in one class
Submit Answers →