python dictionary

Quiz
•
Computers
•
8th Grade
•
Hard
surag patel
Used 2+ times
FREE Resource
Student preview

25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which one of these is a dictionary?
x = ('apple', 'banana', 'cherry')
x = {'type' : 'fruit', 'name' : 'banana'}
x = ['apple', 'banana', 'cherry']
None
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
True or False.
Dictionary items cannot be removed after the dictionary has been created.
True
True
False
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
True or False.
A dictionary cannot have two keys with the same name.
True
False
4.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Select the correct function to print the number of key/value pairs in the dictionary:
x = {'type' : 'fruit', 'name' : 'banana'}
print((_________x))
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
True or False. You can access item values by referring to the key name.
True
False
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Use the get method to print the value of the "model" key of the car dictionary.
car = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
print(__________)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code:
x = {'type' : 'fruit', 'name' : 'banana'}
print(x['type'])
What will be the printed result?
banana
fruit
type = 'fruit'
None
Create a free account and access millions of resources
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

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

Interactive video
•
6th - 10th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
15 questions
Acceptable Use Policy (Quiz)

Quiz
•
6th - 8th Grade
25 questions
Career Vs. Job

Quiz
•
6th - 8th Grade
15 questions
Computer Components Video

Interactive video
•
8th Grade
10 questions
Networking Devices and Their Functions

Interactive video
•
5th - 8th Grade
20 questions
Binary Numbers Quiz

Quiz
•
6th - 8th Grade