<
RHD
/>
Home
Blog
Quiz
Resources
About
Contact
Enlist
// guest
▾
Login
Request Account
[ light ]
// Projects
Projects Quiz
// question 1 of 10
What is the output of: list("Bull")?
['B', 'u', 'l', 'l']
('B', 'u', 'l', 'l')
['Bull']
// question 2 of 10
What does the 'a' mode do when opening a file?
Appends to the end without overwriting
Reads the file only
Overwrites the file completely
// question 3 of 10
What is the output of: [x**2 for x in range(4)]?
[0, 1, 2, 3]
[0, 1, 4, 9]
[1, 4, 9, 16]
// question 4 of 10
What does the load_from_txt() pattern do in the projects?
Reads a file and populates a dictionary
Saves a dictionary to a file
Validates user input
// question 5 of 10
What does time.sleep(0.5) do?
Speeds up execution
Pauses for 5 seconds
Pauses execution for half a second
// question 6 of 10
What does statistics.median([1, 3, 5, 7]) return?
5
3
4.0
// question 7 of 10
What does a set guarantee about its elements?
Elements are ordered
All elements are unique
Elements can be any type including lists
// question 8 of 10
What does defaultdict(list) do when a missing key is accessed?
Creates the key with an empty list as value
Returns None
Raises a KeyError
// question 9 of 10
What does datetime.date.today() return?
The current date and time
The current date as a date object
A formatted string
// question 10 of 10
What does sorted(my_dict) return?
A sorted dictionary
A sorted list of the dictionary's values
A sorted list of the dictionary's keys
Submit Answers →