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