Python Data Types and Operators: 50 Challenging MCQs
Remaining Questions (16-50)
16. What is the type of the following expression in Python? `3 + 4j`
a) int
b) float
c) complex
d) str
17. Which of the following is not a Python data type?
a) int
b) bool
c) long
d) tuple
18. What is the result of the following operation? `10 // 3`
a) 3.33
b) 3
c) 4
d) None of the above
19. Which of the following operators is used for exponentiation in Python?
a) ^
b) **
c) %
d) //
Python Data Types and Operators: 50 Challenging MCQs
20. In Python, slicing a list generates:
a) A copy of the original list
b) A new list
c) None of the above
d) The original list
21. Which of the following is the correct way to declare a set in Python?
a) {1, 2, 3}
b) set[1, 2, 3]
c) [1, 2, 3]
d) None of the above
22. Which of the following is not a valid operator in Python?
a) //
b) !==
c) %
d) **
23. What is the result of `bool([])` in Python?
a) True
b) False
c) Error
d) None
24. Which of the following statements is true?
a) `int` is immutable
Python Data Types and Operators: 50 Challenging MCQs
b) `list` is immutable
c) `tuple` is mutable
d) `set` is immutable
25. What is the result of `"abc" * 3`?
a) "abcabcabc"
b) Error
c) "abcabc"
d) "abc3"
... Remaining 25 Questions follow ...
Python Data Types and Operators: 50 Challenging MCQs
Remaining Answers (16-50)
16. c) complex
17. c) long
18. b) 3
19. b) **
20. b) A new list
21. a) {1, 2, 3}
22. b) !==
23. b) False
24. a) `int` is immutable
25. a) "abcabcabc"
... Remaining 25 Answers Correspondingly ...