
Python Dictionaries Quiz 1
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Medium
Daniel Gosch
Used 1+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What does the code for an empty dictionary look like?
{ }
[ ]
( )
< >
2.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What does a dictionary value with a key 'foo' and a value 42 look like?
{'foo': 42}
{key = foo: value = 42}
{foo, 42}
{42: 'foo'}
3.
MULTIPLE SELECT QUESTION
15 mins • 1 pt
>>> myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}
Which of the two are keys in the myCat dictionary?
size
color
gray
loud
4.
MULTIPLE SELECT QUESTION
15 mins • 1 pt
>>> myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}
Which of the two answers are values in the myCat dictionary?
size
color
gray
loud
5.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
>>> myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}
What will the following code return?
>>> myCat['size']
size
fat
gray
loud
6.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
>>> myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}
What will the following code return?
>>> myCat['color']
size
fat
gray
loud
7.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
>>> myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}
What will the following code return?
>>> myCat['age']
IndexError
KeyError
IndexValueError
12
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?
Similar Resources on Wayground
20 questions
Bài 11. Tệp và quản lý tệp
Quiz
•
10th Grade
20 questions
Teknik Pengolahan Audio dan Video
Quiz
•
12th Grade
10 questions
TIN HỌC 10 - BÀI 21
Quiz
•
10th Grade
12 questions
Tin học 2
Quiz
•
11th Grade
10 questions
Redes Informaticas
Quiz
•
10th Grade
10 questions
7.2 Knowledge check
Quiz
•
9th Grade
10 questions
Bài 25 tin 10
Quiz
•
9th Grade - University
15 questions
Arduino
Quiz
•
7th - 9th Grade
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
