Q34
What is the result of 2 ** 3 % 3 ?
A.
2
B.
0
C.
1
AnswerD.
3
Answer: Option C
Solution
Answer: Option C
Solution:
Exponentiation has higher precedence, so 2 ** 3 is evaluated first, then modulo.
Python Operator Precedence: MCQs for Exam Prep
Programming · Python · question 34
Q34
Answer: Option C