Computer Science - Informatics Practices Class XI/XII Python Dictionary Solved Test Part 1
Q1. Is dictionary in python is a collection or a sequence?
Q2. What do you mean by dictionary in python?
Q3 In dictionary we have _________ value concept.
Q4, In dictionary , key and it's value are separated by ________.
Q5. Entire dictionary is enclosed in _______ braces
Q6. Dictionary is _________(mutable/immutable)
Q7. The ______ of dictionary can be of any type but the _______ must be of immutable type.
Q8. Each key is associated with value.(T/F)
Q9. Write the code to create empty dictionary named 'd'
Q10. Write the output of the following:
>>> a = {}
>>>print(type(a))
Solution:
Q1. Is dictionary in python is a collection or a sequence?
Ans : Collection
Q2. What do you mean by dictionary in python?
Ans : Python dictionary is an unordered collection of items where each item is a KEY-VALUE pair
Q3 In dictionary we have _________ value concept.
Ans. Key
Q4, In dictionary , key and it's value are separated by ________.
Ans. colon(:)
Q5. Entire dictionary is enclosed in _______ braces
Ans. Curly -{ }
Q6. Dictionary is _________(mutable/immutable)
Ans. mutable
Q7. The ______ of dictionary can be of any type but the _______ must be of immutable type.
Ans 7- values, key
Q8. Each key is associated with value.(T/F)
Ans. True
Q9. Write the code to create empty dictionary named 'd'
Ans. d={ }
Q10. Write the output of the following:
>>> a = {}
>>>print(type(a))
Ans. <class 'dict'>
No comments:
Post a Comment