wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Lesson 44 - Dictionary Datatype 2

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which python datatype is having key value pair ?

a)

Dictionary

b)

set

c)

tuple

d)

string

2.

Which of the following is true ?

a)

Dictionary keys are unique

b)

Dictionary keys can have more than one value

c)

Dictionary can have values without having key

d)

none

3.

What will be the output of the following code ?

x={}

print(type(x))

a)

Dictionary

b)

set

c)

list

d)

tuple

4.

Which of the following python datatype encloses with {} ?

a)

Dictionary

b)

list

c)

set

d)

Both set and dictionary

5.

By default python input is of type -

a)

string

b)

int

c)

float

d)

list

6.

Which function is used to copy one dictionary into another ?

a)

copy()

b)

duplicate()

c)

smaple()

d)

Dictionary can't be copied

7.

Which keyword is used to delete particular key from dictionary ?

a)

del

b)

clear

c)

extern

d)

none

8.

Which function in dictionary is used to delete the last inserted element ?

a)

pop()

b)

popitem()

c)

remove()

d)

discard()

9.

Which dictionary function is used to delete as per the given key ?

a)

pop()

b)

popitem()

c)

delete()

d)

discard()

10.

d={'rahul': 75, 'ritesh': 80, 'risav': 90}

How will you access 80 from the given dictionary ?

a)

d['ritesh']

b)

d[1]

c)

d[2]

d)

d[:2:]