Skip to content
Question 47 of 97

Q.What will be the output of the following statement: print(165/42/5-8) (A) -3.33 (B) 6.0 (C) 0.0 (D) -13.33

Tripura TbseCBSE Class XII Board 2024MCQ· 1mImportance★★★★★
48% · 47/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 →

* and / have equal precedence and are evaluated left to right; true division (/) always returns a float in Python 3. The chain collapses 16*5 → 80, /4 → 20.0, *2 → 40.0, /5 → 8.0, −8 → 0.0 — option (C).

Concept — precedence and associativity

In Python, * and / share the same precedence level and are left-associative: with no parentheses, the interpreter simply works through them in the order they appear. - (subtraction) has lower precedence, so it is applied last. One more Python-3 fact decides the form of the answer: the / operator performs true division and always returns a float, so the final result is 0.0, not the integer 0.

Step-by-step evaluation

Expression: 16*5/4*2/5-8

StepOperationResultExpression remaining
116 * 58080/4*2/5-8
280 / 420.0 (float — / divides truly)20.0*2/5-8
320.0 * 240.040.0/5-8
440.0 / 58.08.0-8
58.0 - 80.0done

Runnable check:

print(16*5/4*2/5-8)

Expected output:

0.0

Why the other options are wrong …

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.