Python Dictionaries store information using pairs of (a) and (b)
CS Python Fundamentals Test 12 PRACTICE

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Scott Chamberlain
Used 9+ times
FREE Resource
10 questions
Show all answers
1.
DRAG AND DROP QUESTION
1 min • 1 pt
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The dictionary dnry is initialized as follows:
dnry = {"L": 8, "W": 5, "H": 11}
Which statement would evaluate to 5?
dnry[1]
dnry["W"]
dnry["5"]
dnry[2]
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
For which Python data type does the order of the items matter?
dictionaries only
lists only
both dictionaries and lists
neither dictionaries nor lists
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Dictionary dnry is defined as follows:
dnry = {"A": "x", "B": "y", "C": "z"}
Which Python statement will return True?
I. "y" in dnry
II. "C" in dnry
I only
II only
Both I and II
Neither I nor II
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is printed by the code shown here?
{'PG': 'Adams', 'SG': 'Berk', 'C': 'Dugan'}
{'PG': 'Adams', 'SG': 'Berk', 'C': 'Nelson'}
{'PG': 'Adams', 'SG': 'Berk', 'C': 'Dugan', 'SF': 'Harris', 'C': 'Nelson'}
{'PG': 'Adams', 'SG': 'Berk', 'C': 'Nelson', 'SF': 'Harris'}
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which statement(s) will set the value of the key "99" to "Judge" in the dictionary NYY if the key "99" is found, and add the key/value pair if the key "99" is not found?
I. NYY["99"] = "Judge"
II. NYY.update({"99": "Judge"})
III. NYY.setdefault("99", "Judge")
I only
II only
II and III only
I and II only
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the code shown here?
0
3
10
13
Create a free account and access millions of resources
Similar Resources on Quizizz
14 questions
PYTHON DICTIONARIES

Quiz
•
11th Grade
9 questions
OCR A Level Computer Science (H446) - Component 1.3.1 - Compression, Encryption and Hashing

Quiz
•
11th Grade - University
14 questions
Sejarah Internet

Quiz
•
9th Grade
10 questions
Dictionaries

Quiz
•
11th Grade
7 questions
Python-list,tuple,Dictionary

Quiz
•
11th - 12th Grade
9 questions
Intermediate python

Quiz
•
9th - 12th Grade
7 questions
DICTIONARIES IN PYTHON

Quiz
•
11th Grade
9 questions
Python Programming Quiz

Quiz
•
9th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University