
Understanding Python Dictionaries

Interactive Video
•
Computers
•
9th - 10th Grade
•
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
Create a free account and access millions of resources
Similar Resources on Wayground
6 questions
Dictionaries Video Quiz

Interactive video
•
10th Grade
11 questions
Data Science Prerequisites - Numpy, Matplotlib, and Pandas in Python - Classification in Code

Interactive video
•
9th - 10th Grade
11 questions
Python Interactive Help Features Quiz

Interactive video
•
9th - 10th Grade
11 questions
Understanding Lambda Expressions in Python

Interactive video
•
9th - 10th Grade
12 questions
Running Total Program Concepts

Interactive video
•
9th - 10th Grade
11 questions
Introduction to Java Programming

Interactive video
•
9th - 12th Grade
11 questions
Balancing Chemical Equations Concepts

Interactive video
•
9th - 10th Grade
8 questions
Python for Data Analysis: Step-By-Step with Projects - Renaming Columns

Interactive video
•
9th - 10th Grade
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade