Python - MCQ
Multiple Choice Questions
Python - Multiple Choice Questions (MCQ) - Python Operators and Expression - Set 28
1. What is the output of the expression print(-18 // 4)
A). -4
B). 4
C). -5
D). 5
View Answer
Correct: C
2. What is the output of the following code
x = 6
y = 2
print(x ** y)
print(x // y)
A). 66
0
B). 36
0
A). 66
3
B). 36
3
View Answer
Correct: D
3. Which of the following operators has the highest precedence?
A). not
B). &
C). *
D). +
View Answer
Correct: C
4. What is the output of print(2%6)
A). ValueError
B). 0.33
C). 2
D).
View Answer
Correct: C
5. What is the output of the following code
print(bool(0), bool(3.14159), bool(-3), bool(1.0+1j))
A). True True False True
B). False True True True
C). True True False True
D). False True False True
View Answer
Correct: C