Data Types and Variables – Multiple Choice Questions (MCQs)
-
-
14. What will be the output of `print(5 == '5')`?
-
15. Which operator is used to check if a variable belongs to a specific data type?
-
16. Consider the dictionary `my_dict = {'a': 1, 'b': 2}`. What will be the output of `print(my_dict.get('c', 0))`?
-
17. What will be the output of `print(f'{3.14159:.2f}')`?
-
18. Which method is used to remove and return an arbitrary element from a set?
-
19. What is the data type that represents raw binary data in Python?
-
20. Which of the following is a false value in Python?
-
21. What will be the output of `print(bool('False'))`?
-
22. What will be the output of `print(type(1/2))`?
-
23. What will be the output of `print(0.1 + 0.2 == 0.3)`?
-
24. Which method is used to add a key-value pair to a dictionary?