
Dictionary and string
Quiz
•
Education
•
1st - 4th Grade
•
Practice Problem
•
Hard
Dhirendra yadav
Used 10+ times
FREE Resource
Enhance your content in a minute
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 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
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following Python code snippet?
d1 = {"john":40, "peter":45}
d2 = {"john":466, "peter":45}
d1 == d2
True
False
None
Error
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following piece of code?
a={1:"A",2:"B",3:"C"}
print(a.get(1,4))
1
4
A
invalid
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of above Python code?
d1={"abc":5,"def":6,"ghi":7}
print(d1[0])
abc
5
{"abc":5}
Error
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the result of above Python code?
dict={"Joey":1,"Rachel":2}
dict.update({"Phoebe":2})
print(dict)
{"Joey":1,"Rachel":2,"Phoebe":2}
{"Joey":1,"Rachel":2}
{"Joey":1,"Phoebe":2}
Error
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following is False regarding dictionary in Python?
dict={"Joey":1,"Rachel":2}
dict.update({"Phoebe":2})
print(dict)
Values of a dictionary can be string,integers or combination of both.
Keys of a dictionary can be string,integers or combination of both
The value of a dictionary can be accessed with the help of indices.
None of the above
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following will delete key_value pair for key="tiger" in dictionary?
dic={"lion":"wild","tiger":"wild","cat":"domestic","dog":"domestic"}
del dic["tiger"]
dic["tiger"].delete()
delete(dic.["tiger"])
del(dic.["tiger"])
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
11 questions
EVALUACION DE TCs
Quiz
•
1st Grade
15 questions
SENI RUPA DAERAH
Quiz
•
3rd - 7th Grade
10 questions
informatica
Quiz
•
1st Grade
10 questions
A BBC micro:bit
Quiz
•
3rd - 12th Grade
15 questions
HTML
Quiz
•
1st Grade
15 questions
EPP4 Q1 Week5 WORD PROCESSOR
Quiz
•
1st - 12th Grade
10 questions
FES Youth Financial Literacy - Central Bank & Money (1-3)
Quiz
•
4th - 12th Grade
10 questions
Quiz SC-P8530D
Quiz
•
3rd Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Education
18 questions
CA # 4 2025
Quiz
•
2nd Grade
12 questions
3rd Grade Editing and Revising Practice Quiz
Quiz
•
3rd Grade
20 questions
Unit 3 Week 3 Spelling
Quiz
•
4th Grade
10 questions
Ivan Vocabulary Practice #4
Quiz
•
3rd Grade
20 questions
IREAD: Homonyms
Quiz
•
3rd Grade
9 questions
4th Grade STAAR reading Vocabulary
Quiz
•
4th Grade
