Dictionary in Python Quiz #2

Share with others

Enter details and click on Next

Q11. Key - value concept is in ______________

Q12. Keys and values are separated by ___________

Q13. All elements in dictionary are separated by __________

Q14. Both keys and values are unique in dictionary.

Q15. Which of the following is an example of dictionary?

Q16. 1,2,3 are the keys in the following dictionary

D = {1 : "One", 2 : "Two", 3 : "Three"}

Q17. Keys in dictionary are of ___________ type.

Q18. What type of error is returned by the following code :

a={'a' : "Apple", 'b' : "Banana" , 'c' : "Cat"}
print(a[1])

Q19. Write the output of the following code :

a={'a' : "Apple", 'b' : "Banana" , 'c' : "Cat"}
a['a']="Anar"
print(a)

Q20. Traversing a dictionary can be done using _______


Share with others

Leave a Reply

error: Content is protected !!