On this page
A one-mark CBSE question gives you a line like print(4 + 3 * 2 ** 2 // 5 % 3) and asks for the output. There is no trick in it, only rules. Students who know the rules write the answer in a minute; students who guess lose the mark. This post sets out the precedence order the syllabus expects, flags the places where the NCERT summary needs a closer look, and works through expressions from NCERT and the CBSE sample paper.
What does the syllabus ask?
The CBSE 2026-27 curriculum lists, for Class 11 computer science, arithmetic, relational, logical, assignment, augmented assignment, identity (is, is not) and membership (in, not in) operators, and then "precedence of operators, expression, evaluation of an expression". The Informatics Practices curriculum includes "types of operator, precedence of operators" and "expression evaluation". In Class 12 these return as predict-the-output questions.
What is the precedence order?
NCERT's Class 11 chapter Getting Started with Python, Table 5.9, lists operators from highest to lowest:
** (exponent)
~, unary +, unary −
*, /, %, //
+, −
Relational: <, <=, >, >=, ==, !=
Assignment operators
is, is not
in, not in
not
and
or
Brackets override all of these. NCERT adds that operators of equal precedence are evaluated left to right.
Where does the official Python reference say more?
The Python language reference agrees with the order for arithmetic and logic, and adds three details that matter in output questions:
Exponentiation groups right to left. Equal operators normally go left to right, "except for exponentiation". So 2 3 2 means 2 (3 2) = 2 9 = 512, not 8 2 = 64.
Power binds tighter than a minus on its left. -2 2 is -(2 2) = -4. Write (-2) ** 2 to get 4.
Comparisons, membership and identity share one level and chain. The reference says x < y <= z means x < y and y <= z. So 1 < 3 > 2 is True, because both 1 < 3 and 3 > 2 hold.
NCERT's table places is and in below the relational operators. In practice this matters only in rare chained expressions, which is why the reference's rule is worth knowing.
Worked examples
Each result below was checked by running it in Python 3.
1. From the CBSE 2026-27 sample paper, question 10: print(25+10013/5)
1 ** 3 = 1 (right to left).
100 ** 1 = 100.
100 / 5 = 20.0. The / operator always gives a float.
25 + 20.0 = 45.0, as in the marking scheme.
2. NCERT exercise 7(f): num1 = 2+9*((3*12)-8)/10
Innermost bracket: 3 * 12 = 36, then 36 − 8 = 28.
9 * 28 = 252, then 252 / 10 = 25.2 (left to right).
2 + 25.2 = 27.2.
3. NCERT exercise 7(g): 24 // 4 // 2 goes left to right: 24 // 4 = 6, then 6 // 2 = 3.
4. NCERT exercise 7(l): 10 + 6 * 2 ** 2 != 9//4 - 3 and 29 >= 29/9
Left side: 2 ** 2 = 4, 6 * 4 = 24, 10 + 24 = 34.
9 // 4 = 2, and 2 − 3 = −1.
34 != −1 is True.
29 / 9 = 3.22..., so 29 >= 3.22... is True.
True and True is True.
5. The opening question: 4 + 3 * 2 ** 2 // 5 % 3
2 ** 2 = 4.
Now *, // and % share a level, so go left to right: 3 * 4 = 12, 12 // 5 = 2, 2 % 3 = 2.
4 + 2 = 6.
Which traps catch students?
5 > 3 == True prints False. It chains to 5 > 3 and 3 == True, and 3 == True is False.
not 2 == 3 prints True. Comparison happens first, then not.
Floor division of negatives. -7 // 2 is -4, because // rounds down, not towards zero. And -7 % 2 is 1.
and and or return operands. 0 or 5 gives 5, and 3 and 0 gives 0, not True or False.
Augmented assignment comes last. With x = 5, x += 3 * 2 makes x equal to 11, since 3 * 2 is worked out first.
A practice routine
Write ten expressions a week that mix at least three precedence levels. Evaluate each on paper, one operation per line, then run it.
Keep a list of every expression you got wrong and which rule you missed.
Before the exam, redo all of NCERT's exercise 7 and question 10 of the sample paper.
For output questions that use loops and lists, our guide to tracing predict-the-output questions adds a trace-table method, and the CBSE Class 12 Python basics guide covers strings, lists and scope.
When an evaluation keeps going wrong at the same step, the Fermi Problem Library has a step-by-step solver that explains the reasoning rather than printing an answer.
Try it now: evaluate 2 + 3 2 0 * 4 on paper, then check it in Python.



