Dictionary in Python

Dictionary in Python

11th Grade

10 Qs

quiz-placeholder

Similar activities

Spoljna memorija - HDD

Spoljna memorija - HDD

9th - 11th Grade

10 Qs

ASAS SAINS KOMPUTER : TINGKATAN 3

ASAS SAINS KOMPUTER : TINGKATAN 3

4th Grade - University

12 Qs

Technology Week HTG Quiz - Monday

Technology Week HTG Quiz - Monday

7th - 12th Grade

10 Qs

Thinglink

Thinglink

9th - 12th Grade

10 Qs

HTML (3CS)

HTML (3CS)

10th - 11th Grade

10 Qs

Cha-ching 2

Cha-ching 2

1st Grade - University

8 Qs

Python Level 3 - Minecraft

Python Level 3 - Minecraft

5th - 12th Grade

11 Qs

Cascading Style Sheets

Cascading Style Sheets

8th - 12th Grade

11 Qs

Dictionary in Python

Dictionary in Python

Assessment

Quiz

Computers

11th Grade

Practice Problem

Hard

Created by

Sangeetha John

Used 12+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?