Bird
0
0

Which operator is evaluated first in the expression 5 + 3 ** 2 * 2?

easy📝 Conceptual Q1 of 15
Python - Operators and Expression Evaluation
Which operator is evaluated first in the expression 5 + 3 ** 2 * 2?
AAddition (+)
BExponentiation (**)
CMultiplication (*)
DLeft to right evaluation
Step-by-Step Solution
Solution:
  1. Step 1: Identify operator precedence

    Exponentiation (**) has higher precedence than multiplication (*) and addition (+).
  2. Step 2: Apply precedence to expression

    First, 3 ** 2 is evaluated, then multiplied by 2, and finally 5 is added.
  3. Final Answer:

    Exponentiation (**) is evaluated first -> Option B
  4. Quick Check:

    Operator precedence = Exponentiation first [OK]
Quick Trick: Exponentiation (**) always before multiplication and addition [OK]
Common Mistakes:
MISTAKES
  • Thinking multiplication (*) is before exponentiation
  • Assuming left to right always applies
  • Confusing addition (+) precedence

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Python Quizzes