Important QnA Python Dictionary class11

Important QnA Python Dictionary class11 contains questions related to the topic dictionary in python for class 11. As we have already covered the basics of the dictionary in the previous article. So let us see questions based on this topic. Let’s Start!

Important QnA Python Dictionary class11

So let’s start the article Important QnA Python Dictionary class11 with Objective types questions. In this section we will provides you some fill in the blanks, True/False, MCQ based questions with their solutions.

  1. The ___________ refers to a bunch of values in a single variable. (Ans. Collection)
  2. The ____________ is unordered collections with elements in the form of a key:value pairs. (Ans. dictionary)
  3. Dictionaries are mutable. (True/False)
  4. The key can be considered as an index into the dictionary. (True/False)
  5. Which of the brackets are used to define the dictionary?
    1. Round Bracket ()
    2. Square Bracket []
    3. Curly Bracket {}
    4. Angular Bracket <>
  6. The key and value is separated by ___________ symbol in the dictionary.
    1. Comma ,
    2. Semi-Colon ;
    3. Dash –
    4. Colon :
  7. The dictionary key can be mutable types. (True/False)
  8. Which of the following is the correct statement to access the value of an element of dictionary through key?
    1. <dictionary> [<key>]
    2. <dictionary> <key>
    3. <dictionary>.<key>
    4. <dictionary>-<key>
  9. A dictionary operation accepts the key and returns the associated element value is called _________. (Ans. Lookup)
  10. What happens when the user is trying to access a that doesn’t exist?
    1. Return None
    2. Return Garbage Value
    3. Return Last Value
    4. Return Error
  11. Tuple can be used as a key in the dictionary. (True/False)
  12. The _________ method returns all the keys defined in the dictionary in form of a list. (Ans. keys())
  13. The _________ method returns all the keys defined in the dictionary in form of a list. (Ans. values())
  14. Linking with a key and associated value by an internal algorithm is known as ______________.
    1. Algorithm
    2. Join
    3. Hash-function
    4. Link
  15. The keys and values both must be unique for the dictionaries. (True/False)
  16. The in and not in operator will check the presence of keys only, not the value. (True/False)
  17. The statements <dictionary>.get(<key>) and <dictionary>[<key>] are similar. (True/False)
  18. Which of the following method will add a key to the dictionary if it does not already exist in the dictionary?
    1. insert()
    2. fromkeys()
    3. update()
    4. setdefault()
  19. Which of the method is used to create a new dictionary from a sequence with all the keys and a common value?
    1. insert()
    2. fromkeys()
    3. update()
    4. setdefault()
  20. Which of the following is method removes and returns a key:value pair that follows LIFO order?
    1. pop()
    2. remove()
    3. popitem()
    4. delete()
  21. Which of the following copy option copies the upper layer whereas the inner referenced object is not copied.
    1. Shallow copy
    2. Deep Copy
    3. Key copy
    4. partial copy
  22. What is the output of this code: d ={‘Ind’:’Virat Kohli’,’MS Dhoni’:’Ind’,’NZ’:’Kane Williamson’};print(d[‘Ind’])
    1. Virat Kohli
    2. MS Dhoni
    3. Ind
    4. All of these
  23. What is the output of this code:d={‘Virat Kohli’:1,’Steve Smith’:2,’Babar Azam’:3,’Faf Du Plesis’:4};print(d[3])
    1. ‘Babar Azam’:3
    2. ‘Faf Du Plesis’:4
    3. Babar Azam
    4. Error
  24. The sorted() function cannot work with a dictionary. (True/False)
  25. A dictionary can have repeated keys. (True/False)

In the next section of QnA Python Dictionary class11, we will see some subjective type questions:

Subjective type questions

Important QnA Python Dictionary class11 subjective types questions are as following:

  1. What do you mean by a dictionary? Explain with the context of key:value pair?
  2. What are the characteristics of a dictionary that differs it from other collections like lists, tuples, sets of python?
  3. Why dictionaries are considered as associative arrays or mappings or hashes?
  4. How to traverse a dictionary using loops?
  5. How you can access keys and values simultaneously? Explain with the example.
  6. What are the different ways to create a dictionary? Elaborate your answer with an example.
  7. How to add, update and delete element from the dictionary? Illustrate your answer with an example.
  8. How to access items, keys and values from a dictionary? Describe the answer with an example.
  9. How make a copy of a dictionary? Explain all methods with example.
  10. Which aggregate functions can be used with dictionaries? Write your answer with suitable examples.

I hope you have enjoyed this article QnA Python Dictionary class11. Visit this page QnA Python Dictionary class11 regularly , more questions will be added.

Thank you for reading this article QnA Python Dictionary class11. If you have anything for me, you are welcome in the comment section. Share your valuable feedback, suggestions, loveable comments as a token of love in the comment section.

Follow the below given links for the same category:

Class 11 Material

Leave a Reply