<
RHD
/>
Home
Blog
Quiz
Resources
About
Contact
Enlist
// guest
▾
Login
Request Account
[ light ]
// Modules & Packages
Modules & Packages Quiz
// question 1 of 10
What does len([1 2 3]) return?
2
3
1
// question 2 of 10
What does Counter count?
Length of strings
Occurrences of items
Random numbers
// question 3 of 10
What does math.floor(5.9) return?
5
6
5.9
// question 4 of 10
What does random.random() return?
Boolean value
Float between 0 and 1
Integer between 1 and 10
// question 5 of 10
What does random.choice() do?
Counts items
Selects a random item
Sorts a list
// question 6 of 10
What does date.today() return?
Current time
Random date
Current date
// question 7 of 10
What format code gives the year?
%m
%Y
%d
// question 8 of 10
What gives the current date and time?
datetime.now()
time.sleep()
random.randint()
// question 9 of 10
What does the random module do?
Creates classes
Reads files
Generates random values
// question 10 of 10
What does random.choice(""abc"") return?
b
Random character
a
Submit Answers →