
Python Dictionaries Quiz 1

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Daniel Gosch
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
Typing words on keyboard (colours)

Quiz
•
KG - Professional Dev...
11 questions
Final Exam: Web Layout (HTML & CSS)

Quiz
•
12th Grade
20 questions
Chapter 6 Cascading Style Sheets

Quiz
•
9th - 12th Grade
15 questions
HTML

Quiz
•
9th - 12th Grade
17 questions
HTML podstawy

Quiz
•
8th Grade - University
12 questions
Web Development

Quiz
•
8th - 10th Grade
11 questions
Basic HTML Tags I

Quiz
•
9th - 12th Grade
12 questions
Photoshop Review

Quiz
•
KG - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade