Vidyalelo
Python · Q2

Python Operator Precedence: MCQs for Exam Prep

Programming · Python · question 2

Q2

What is the result of 2 ** 3 ** 2 ?

A.
64
B.
512
Answer
C.
18
D.
81

Answer: Option B

Solution

Answer: Option B
Solution:
Exponentiation is right-associative, so the expression is evaluated as 2 ** (3 ** 2).