Dictionary Quiz 1
Sign in to Google to save your progress. Learn more
Email *
What will be the output of the following Python code snippet?                                                                                       d = {"john":40, "peter":45}                                    print(list(d.keys())) *
1 point
What will be the output of the following Python code snippet?                                                                                     d1 = {"john":40, "peter":45}                                                     d2 = {"john":466, "peter":45}                                                 d1 == d2 *
1 point
What will be the output of the following Python code snippet?                                                                                      d = {"john":40, "peter":45}                                             d["john"] *
1 point
Suppose d = {“john”:40, “peter”:45}, to delete the entry for “john” what command do we use? *
1 point
Suppose d = {“john”:40, “peter”:45}. To obtain the number of entries in dictionary which command do we use? *
1 point
Which of the following is not a declaration of the dictionary? *
1 point
What will be the output of the following Python code snippet?                                                                                         a={1:"A",2:"B",3:"C"}                                                      print(a.get(1,4)) *
1 point
Which of these about a dictionary is false? *
1 point
What will be the output of the following Python code snippet?                                                                                     d1 = {"john":40, "peter":45}                                                   d2 = {"john":466, "peter":45}                                                 d1 > d2 *
1 point
Suppose d = {“john”:40, “peter”:45}, what happens when we try to retrieve a value using the expression d[“susan”]? *
1 point
What will be the output of the following Python code snippet?                                                                                       a={1:"A",2:"B",3:"C"}                                                                 for i, j in a.items():                                                                                                                                                                                                                                                       print(i, j, end=" ") *
1 point
Which of the following statements create a dictionary? *
1 point
What will be the output of the following Python code snippet?                                                                                      d = {"john":40, "peter":45}                                               "john" in d *
1 point
Which of the following isn’t true about dictionary keys? *
1 point
What will be the output of the following Python code snippet?                                                                       d = {"john":40, "peter":45} *
1 point
Submit
Clear form
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy