
Dictionary Operations Quiz

Quiz
•
Computers
•
11th Grade
•
Medium
Nisreen Ariwala
Used 1+ times
FREE Resource
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function creates a dictionary from a sequence of key-value pairs?
tuple()
list()
dict()
set()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the method dict1.keys() return?
A list of items
A single value
A list of values
A list of keys
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will dict1.get('Sohan') return if 'Sohan' is not a key in dict1?
0
None
Error
False
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the method dict1.update(dict2) do?
Appends key-value pairs from dict2 to dict1
Creates a new dictionary
Clears dict1
Deletes dict1
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of dict1.clear()?
An empty dictionary
An error
None
The original dictionary
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does dict1.items() return?
A list of keys
A list of values
A list of key-value pairs
A single key-value pair
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method returns a list of values in the dictionary?
dict1.keys()
dict1.items()
dict1.get()
dict1.values()
Similar Resources on Wayground
10 questions
SmartArts

Quiz
•
9th - 12th Grade
9 questions
Unit 5 -- Lists, Loops, Traversals

Quiz
•
9th - 12th Grade
10 questions
Python Dictionary

Quiz
•
9th - 11th Grade
10 questions
Track Changes and Comments

Quiz
•
10th - 11th Grade
10 questions
Understanding Python Dictionaries

Quiz
•
11th Grade
12 questions
Python dictionaries

Quiz
•
8th - 11th Grade
10 questions
Database Concepts - Second

Quiz
•
11th Grade
6 questions
Python Training Module Quiz

Quiz
•
KG - University
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