Vidyalelo
Python · Q45

Python Operator Precedence: MCQs for Exam Prep

Programming · Python · question 45

Q45

What is the result of 8 - 6 / 2 ?

A.
4
B.
5
Answer
C.
1
D.
2

Answer: Option B

Solution

Answer: Option B
Solution:
Division has higher precedence, so 6 / 2 is evaluated first, then subtracted from 8.