0%
0

Get ready, set, go

Time ended


Quiz on Python Dictionary

This is a comprehensive MCQ quiz on Python Dictionary

1 / 10

1. What would the following code print?

d={'spring':'autumn','autumn':'fall','fall':'spring'}

print(d['autumn'])

2 / 10

2. With a dictionary d, d.clear( ) will perform what action?

3 / 10

3. >>> dict1={'Mohan':95,'Ram':89,'Sohan':74}

What will the following statement do ?

>>>dict1['Sohan']=75

4 / 10

4. Dictionaries are _________ set of elements

5 / 10

5. The keys of a dictionary may be:

6 / 10

6. Dictionaires are ____________ data types of Python

7 / 10

7. Which of the following is correct with respect to the python code:  d={"a":3, "b":7}

8 / 10

8. What will be the output of following two lines of python code ?

>>>d1={'abc':5,'def':6,'ghi':7}

>>>d1[0]

9 / 10

9. What output will following lines of code give ?

>>d={'Salary':10000,'age':23,'name':'Johny'}

>>>'age' in d

10 / 10

10. Which of the following functions will return the key, value pairs of a dictionary?

Your score is

The average score is 0%

Share this quiz with your friends,

 

LinkedIn Facebook Twitter
0%

Rate the quiz

error: Content is protected !!