Basics of Python – Multiple Choice Questions (MCQs)
-
-
38. What is a dictionary in Python?
-
39. How do you access the value associated with the key 'name' in a dictionary called 'my_dict'?
-
40. What is a set in Python?
-
41. How do you add an element to a set called 'my_set'?
-
42. What is the output of `print(True and False)`?
-
43. What is the output of `print(True or False)`?
-
44. What is the output of `print(not True)`?
-
45. Which operator is used for equality comparison in Python?
-
46. Which operator is used to check if two variables refer to the same object in memory?
-
47. What is the output of `print(5 is 5.0)`?
-
48. What is the output of `print(5 == 5.0)`?