Choose a topic to test your knowledge and improve your Python skills
Keys of dictionary must be _______________
Dictionaries in python are _______
Which of the following is used to delete an element from Dictionary?
Which statement is used to create an empty dictionary? a.
Dictionary is a ___________ data type.
Write the output of the following : d1 = {"a" : 50, "b" : 50} d2 = {"a" : 500, "b" : 50} print(d1 > d2)
Key – value concept is in ____
In dictionary Keys and values are separated by ________________
All elements in dictionary are separated by _________
Which of the following is an example of dictionary?
1,2,3 are the ______________ in the following dictionary. D = {1 : “One”, 2 : “Two”, 3 : “Three”}
Keys in dictionary are _____________ .
What type of error is returned by the following code : a={'a' : "Apple", 'b' : "Banana" , 'c' : "Cat"} print(a[1])
Write the output of the following code : a={'a' : "Apple", 'b' : "Banana" , 'c' : "Cat"} a['a']="Anar" print(a)
Traversing a dictionary can be done using ____________
The following code will return data as ______________
Write the output of the following code : A = {1 : "One", 2 : "Two", 3 : "Three"} B = {'A' : "Apple", 'B' : "Bat", 'C' : "Cat", 'D' : "Doll"} A.update(B) #print(B.values()) print(B)
Write the output of the following code : A = {1 : "One", 2 : "Two", 3 : "Three"} B = {'A' : "Apple", 'B' : "Bat", 'C' : "Cat", 'D' : "Doll"} print(A.get(4,"Key Not Found"))
Write the output of the following: A = {1 : "One", 2 : "Two", 3 : "Three"} B = {'A' : "Apple", 'B' : "Bat", 'C' : "Cat", 'D' : "Doll"} for i in A: print(i)
Which statement is not correct in reference to the following code? A = {1 : "One", 2 : "Two", 3 : "Three"} A[4] = "Four"
The following code is an example of _______ N = {A: {'name': 'Ravi', 'age': '5', 'sex': 'M'}, B: {'name': 'Golu', 'age': '2', 'sex': 'F'}}
pop( ) function delete and ____ the element of dictionary.
Which of the following is not method of dictionary?
Write the output of the following code : A = {1 : "One", 2 : "Two", 3 : "Three"} print(A[2] + A[1])
_______ datatype fall under mapping
The key-value pair in dictionary is called ____
Choose the correct statement Assertion (A) : Items in dictionaries are unordered. Reason (R) : We may not get back the data in the same order in which we had entered the data initially in the dictionary.
_______ is the suitable data type for keys of dictionary in python.
Choose the correct statement : Statement A : Dictionaries are mutable. Statement B : Contents of the dictionary can not changed after it has been created
Write the output of the following : A = {1 : "One", 2 : "Two", 3 : "Three"} print("One" in A)
_________ function returns the number of key: value pairs of the dictionary.
Which of the following function create a dictionary from a sequence of key-value pairs
Following statement return values in the form of _______ >>> D1.keys() #D1 is a dictionary
Which of the following is feature of Dictionary?
Which of the following is feature of Dictionary?
Which of the following is feature of Dictionary?
Which of the following is feature of Dictionary?
Which of the following is feature of Dictionary?
A = {“A” : “Apple”, “B” : “Ball”, “C” : “Cat”} Which of the following statement will return : dict_items([(‘A’, ‘Apple’), (‘B’, ‘Ball’), (‘C’, ‘Cat’)])
Which of the following are immutable data type? a. String b. Tuple c. List d. Dictionary
_________ function returns the value corresponding to the key passed as the argument.
Write the output of the following : A = {"A" : "Apple", "B" : "Ball", "C" : "Cat"} print(A.get("D"))
Which function helps to merge dictionary ‘D1’ and ‘D2’?