
Dictionary in Python

Quiz
•
Computers
•
11th Grade
•
Hard
Sangeetha John
Used 11+ times
FREE Resource
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])
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Python Programming Random Quiz

Quiz
•
11th Grade
15 questions
Iteration

Quiz
•
9th - 12th Grade
10 questions
11 - IF ELSE

Quiz
•
11th Grade
15 questions
Python Lists

Quiz
•
10th - 12th Grade
10 questions
Python Input/Output

Quiz
•
9th - 12th Grade
15 questions
Pętla for i while

Quiz
•
9th - 12th Grade
10 questions
MOAC Excel 2016 Lesson 03

Quiz
•
8th - 12th Grade
10 questions
Python ismétlés

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade