Question:medium

What will be the output of the following statement?
print(14%3**2*4)

Show Hint

Always remember BODMAS or PEMDAS for operator precedence.
In Python, exponentiation comes first, followed by multiplication, division, modulo, addition, and subtraction.
Use parentheses to clarify and control the order when needed.
Updated On: Jan 14, 2026
  • 16
  • 64
  • 20
  • 256
Show Solution

The Correct Option is C

Solution and Explanation

The expression 14%32*4 is evaluated following Python's operator precedence. The exponentiation operator `` has the highest precedence, so $32$ is computed first, resulting in 9. Next, the modulo operator `%` is evaluated: $14%9$ yields the remainder of 14 divided by 9, which is 5. Finally, the multiplication operator `*` is applied: $5 * 4$ equals 20. Therefore, the output of print(14%32*4) is 20. Understanding operator precedence is crucial in Python to avoid incorrect calculations. Use parentheses to explicitly define the order of operations when needed for clarity.
Option (C) is correct.
Was this answer helpful?
0