<
RHD
/>
Home
Blog
Quiz
Resources
About
Contact
Enlist
// guest
▾
Login
Request Account
[ light ]
// Data Structures
Data Structures Quiz
// question 1 of 10
What is printed? print(""x"" in {""x"":1,""y"":2})
1
False
True
// question 2 of 10
What does close() do?
Closes the file
Saves variables
Deletes the file
// question 3 of 10
What mode opens a file for reading?
w
a
r
// question 4 of 10
What is printed? with open(""a.txt"",""w"") as f: print(f.mode)
a
w
r
// question 5 of 10
What does values() return?
Dictionary values
Dictionary keys
List indexes
// question 6 of 10
Which brackets create a set?
{}
[]
()
// question 7 of 10
What does sort() do?
Deletes duplicates
Reverses the list
Sorts the list
// question 8 of 10
What is printed? print((1,2)+(3,4))
Error
(4,6)
(1,2,3,4)
// question 9 of 10
What is a tuple?
An ordered immutable collection
A mutable list
A set of keys
// question 10 of 10
What is printed? print([x for x in ""abc""])
[""a"",""b"",""c""]
abc
[""abc""]
Submit Answers →