Complete the following code and predict the output:
Q. Complete the following code and predict the output: # Data to count. names =…
Q. Complete the following code and predict the output: # Data to count. names =…
Q. Assume that price_dict is a Python variable to which a dictionary literal ha…
True / False For Dictionaries Class 11 Computer Science (CS), Informatics Pract…
Fill In the Blanks For Dictionaries Class 11 Computer Science (CS), Informatics…
Multiple Choice Question For Dictionaries Class 11 Computer Science (CS), Infor…
Q. Write a Python program that accepts a value and checks whether the inputted …
Q. Predict the output: (a) d = {(1, 2):1, (2, 3):2} print (d[1, 2]) (b) d = {…
Q. What will be the output of the following code: d1 = {5: [6, 7, 8], "a&q…
Q. The following code is giving some error. Find out the error and write the co…
Q. Suppose >>>d1 = {1: 'one', 2: 'two', 3: 'three&…
Q. Find errors and rewrite the same after correcting the following code: (a) d1…
Q. What are the differences between strings and dictionary? Answer:- The dictio…
Q. What is a key-value pair in dictionary? Answer:- Dictionaries are simply ano…
Q. A dictionary has three keys: 'assets', 'liabilities' and …
Q. Discuss the working of copy() if (i) The values are of immutable types, (ii)…
Q. What is the use of copy() function? Answer = The copy() method is used retu…
Q. What do you understand by shallow copy of a dictionary? Answer = A shallow c…
Q. Can you use sum() for calculating the sum of the values of a dictionary? Ans…
Q. Will max() and min() always work for a dictionary? Answer = Yes, if the dict…
Q. If sorted() is applied on a dictionary, what does it return? Answer = If onl…