Vidyalelo
Python · Q26

Python Operator Precedence: MCQs for Exam Prep

Programming · Python · question 26

Q26

What is the result of 8 / 2 ** 2 ?

A.
1
B.
8
C.
4
Answer
D.
16

Answer: Option C

Solution

Answer: Option C
Solution:
Exponentiation has higher precedence than division, so 2 ** 2 is evaluated first.