Exam 10: Dictionaries and Sets
Exam 1: Introduction to Computers and Programming35 Questions
Exam 2: Input, Processing, and Output35 Questions
Exam 3: Simple functions34 Questions
Exam 4: Decision Structures and Boolean Logic35 Questions
Exam 5: Repetition Structures35 Questions
Exam 6: Value-Returning functions and Modules35 Questions
Exam 7: files and Exceptions35 Questions
Exam 8: Lists and Tuples35 Questions
Exam 9: More About Strings35 Questions
Exam 10: Dictionaries and Sets35 Questions
Exam 11: Classes and Object-Oriented Programming35 Questions
Exam 12: Inheritance35 Questions
Exam 13: Recursion35 Questions
Exam 14: GUI Programming35 Questions
Select questions type
You would typically use a for loop to iterate over the elements in a set.
(True/False)
4.9/5
(89)
In order to avoid KeyError exceptions, you can check whether a key is in the dictionary using the _____ operator.
(Multiple Choice)
4.8/5
(75)
Which function would you use to get the number of elements in a dictionary?
(Multiple Choice)
4.9/5
(74)
The union of two sets is a set that contains only the elements that appear in both sets.
(True/False)
4.9/5
(85)
The _______________ method clears the contents of a dictionary.
(Short Answer)
4.9/5
(69)
What does the get method do if the specified key is not found in the dictionary?
(Multiple Choice)
4.8/5
(80)
The _______________ of two sets is a set that contains all the elements of both sets.
(Short Answer)
4.8/5
(88)
What method can be used to add a group of elements to a set?
(Multiple Choice)
5.0/5
(66)
Each element in a(n) _______________ has two parts: a key and a value.
(Short Answer)
5.0/5
(95)
The elements in a dictionary are not stored in a specific order. Therefore a dictionary is not a(n) _______________.
(Short Answer)
4.8/5
(64)
A(n) _______________ is an object that holds multiple unique items of data in an unordered manner.
(Short Answer)
4.8/5
(72)
A dictionary can include the same value several times, but cannot include the same key several times.
(True/False)
4.9/5
(74)
The built-in function _______________ returns the number of items in a set.
(Short Answer)
4.8/5
(73)
What is the process used to convert an object to a stream of bytes that can be saved in a file?
(Multiple Choice)
4.9/5
(87)
Showing 21 - 35 of 35
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)