What is the output of the following code
dict1 = {"key1":1, "key2":2}
dict2 = {"key2":2, "key1":1}
print(dict1 == dict2)
Python Dictionary
Quiz
•
Computers
•
11th - 12th Grade
•
Medium
Sreelekshmi S
Used 77+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code
dict1 = {"key1":1, "key2":2}
dict2 = {"key2":2, "key1":1}
print(dict1 == dict2)
True
False
2.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Select correct ways to create an empty dictionary
sampleDict = {}
sampleDict = dict()
sampleDict = dict{}
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Please select all correct ways to empty the following dictionary
student = {
"name": "Emma",
"class": 9,
"marks": 75
}
del student
del student[0:2]
student.clear()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Items are accessed by their position in a dictionary
True
False
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The code snippet above outputs
error
None
NaN
-1
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Dictionary keys must be immutable
True
False
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, Dictionaries are immutable
True
False
15 questions
Problem Solving using Python and R - UNIT II - Dictionary
Quiz
•
12th Grade
15 questions
python dictionary
Quiz
•
11th Grade
15 questions
Python-Day-3
Quiz
•
12th Grade - University
20 questions
Season 5 #Spaic Python Weekly Quiz
Quiz
•
KG - Professional Dev...
22 questions
Fundamentals of Programming (GCSE Computer Science AQA)
Quiz
•
9th - 11th Grade
20 questions
Mastering Python Loops and Conditionals
Quiz
•
12th Grade
15 questions
Тест з програмування на Python
Quiz
•
12th Grade - University
15 questions
Section 3D: Collect and process data using dictionaries
Quiz
•
12th Grade
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
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