Dictionaries are set of elements.

Dictionaries

Quiz
•
Computers
•
11th Grade
•
Easy
Reshma Surendran
Used 7+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Ordered
Unordered
Sorted
Random
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Dictionaries are _____ data types of Python.
Mutable
Simple
Immutable
All of these
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following will raise an error if the given key is not found in the dictionary ?
del statement
pop()
getitem()
all of these
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is correct with respect to above Python code?
d = {"a":3,"b":7}
(a) a dictionary d is created.
(b) a and b are the keys of dictionary d.
(c) 3 and 7 are the values of dictionary d.
(d) All of these.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would the following code print?
d = {'spring': 'autum', "autumn": "fall", "fall":"spring"}
print (d["autumn"])
(a) autumn
(b) fall
(c) spring
(d) Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed by the following statements?
D1 = {"cat":17, "dog":6, "elephant":23, "bear":20}
print ("dog" in D1)
(a) True
(b) False
(c) Error
(d) None
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following will delete key_value pair for key = "tiger" in dictionary?
di = {"loin" : "wild", "tiger" : "wild", "cat": "domestic" : "dog" : "domestic"}
(a) del di["tiger"]
(b) di[“tiger”].delete()
(c) delete(di.["tiger"])
(d) del(di.["tiger])
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Python revision

Quiz
•
10th Grade - University
10 questions
Quiz1_HPB2021_2010t1

Quiz
•
1st - 12th Grade
15 questions
Python Coding Specialist: Quiz Variables and Data Types

Quiz
•
9th Grade - University
15 questions
Словники в Python

Quiz
•
11th Grade
15 questions
Python_quiz

Quiz
•
11th Grade
15 questions
Grade XI test

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

Quiz
•
11th Grade - University
14 questions
PYTHON DICTIONARIES

Quiz
•
11th 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
20 questions
Types of Credit

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

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