Skip to content
Question 22 of 97

Q.What will be the output of the following statement?
print(14%3**2*4)  
(A) 16 (B) 64 (C) 20 (D) 256

Yanam BieapCBSE Class XII Board 2025MCQ· 1mImportance★★★★★
23% · 22/97 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

The expression 14%3**2*4 is evaluated using Python's operator precedence: exponentiation first, then modulo and multiplication left to right, giving 20 — option (C).

When evaluating an expression like 14%3**2*4 in Python, the order of operations is decided by operator precedence, which is similar to BODMAS/PEMDAS but tailored to Python's operators.

For the operators here:

  • ** (exponentiation) has the highest precedence.
  • * (multiplication) and % (modulo) share the same, lower precedence.
  • Operators of equal precedence are evaluated left to right.

Let's break it down step by step.

  1. Exponentiation (**) first. 3**2 means 3 raised to the power 2, i.e. 3 x 3 = 9. The expression becomes 14 % 9 * 4.

  2. Modulo (%) and multiplication (*), left to right. Both have equal precedence, so we go left to right. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.