
Dictionary in Python
Quiz
•
Computers
•
11th Grade
•
Practice Problem
•
Hard
Sangeetha John
Used 12+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What will be the output of following code-
a={1:"A",2:"B",3:"C"}
for i in a:
print(i,end=" ")
2.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
What will be the output of following code-
a={i: i*i for i in range(6)}
a
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
a={}
a[2]=1
a[1]=[2,3,4]
print(a[1][1])
4.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What will be the output of following program:
dictionary = {1:'1', 2:'2', 3:'3'}
del dictionary[1]
dictionary[1] = '10'
del dictionary[2]
print(len(dictionary))
5.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
What will be the output of following program:
a={1:5,2:3,3:4}
a.pop(3)
print(a)
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What will be the output of following program:
my_dict = {}
my_dict[(1,2,4)] = 8
my_dict[(4,2,1)] = 10
my_dict[(1,2)] = 12
sum = 0
for k in my_dict:
sum += my_dict[k]
print (sum)
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What will be the output of following program:
a = {(1,2):1,(2,3):2}
print(a[1,2])
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
CAPÍTULO 1 NETWORKING ESSENTIALS
Quiz
•
1st - 12th Grade
8 questions
Overview of IT
Quiz
•
6th Grade - University
10 questions
Animasi 2D dan 3D Ulangan Harian BAB 1
Quiz
•
11th Grade
12 questions
Wee Word Intro
Quiz
•
7th - 12th Grade
10 questions
Bài tập Tin học lớp 4
Quiz
•
1st - 12th Grade
14 questions
K10 - WHILE
Quiz
•
11th Grade
14 questions
Bài 29. Nhận biết lỗi chương trình
Quiz
•
9th - 12th Grade
9 questions
Test Excel
Quiz
•
10th - 12th 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
