
python dictionary
Authored by V. Charles Prabu
Computers
University
Used 18+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Select correct ways to create an empty dictionary
sampleDict = {}
sampleDict = dict()
sampleDict = dict{}
sampleDict = ()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following dictionary operation
dict1 = {"name": "Mike", "salary": 8000}
temp = dict1.get("age")
print(temp)
KeyError: ‘age’
None
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Select the all correct way to remove the key ‘marks‘ from a dictionary
student = { "name": "Emma", "class": 9, "marks": 75 }
student.pop(“marks”)
del student[“marks”]
student.popitem()
dict1.remove(“key2”)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Items are accessed by their position in a dictionary and All the keys in a dictionary must be of the same type.
True
False
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Dictionary keys must be immutable
True
False
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements create a dictionary?
d = {}
d = {“john”:40, “peter”:45}
d = {40:”john”, 45:”peter”}
All of the mentioned
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code snippet?
d = {"john":40, "peter":45}
d["john"]
40
45
“john”
“peter”
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
untitled
Quiz
•
11th Grade - University
10 questions
Tree and Planar Graph
Quiz
•
University
10 questions
Mini 2 (5junio)
Quiz
•
University
10 questions
Unguided transmission media
Quiz
•
University
13 questions
CSC 2663 - Database administrative Functions
Quiz
•
University
12 questions
Python Quiz 1.4
Quiz
•
University
11 questions
Execl Quiz
Quiz
•
7th Grade - University
10 questions
ICT 1202-B-2021-Q1
Quiz
•
University
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Computers
8 questions
2 Step Word Problems
Quiz
•
KG - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
10 questions
14.2 Independent/Dependent Variables
Quiz
•
KG - University
18 questions
Great Lakes States
Quiz
•
KG - University
7 questions
DNA, Chromosomes, Genes, and Traits: An Intro to Heredity
Interactive video
•
11th Grade - University
7 questions
Reflexive Verbs in Spanish
Lesson
•
9th Grade - University
7 questions
Narrative Writing 1
Interactive video
•
4th Grade - University