
Understanding Python Dictionaries
Interactive Video
•
Computers
•
9th - 10th Grade
•
Practice Problem
•
Hard
Jennifer Brown
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is another name for an associative array in computer science?
List
Map
Queue
Stack
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, what is the structure used to store key/value pairs?
List
Set
Tuple
Dictionary
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a valid data type for a dictionary key in Python?
Tuple
Integer
String
List
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you add a new key/value pair to an existing dictionary using brackets?
Use the 'append' method
Use the 'insert' method
Use the 'add' method
Assign a value to a key inside brackets
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What error is raised when trying to access a non-existent key in a dictionary?
ValueError
IndexError
TypeError
KeyError
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method can be used to safely retrieve a value from a dictionary with a default if the key is missing?
search
get
find
lookup
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method can be used to iterate over both keys and values in a dictionary?
keys
values
items
pairs
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade