Skip to content
Question 60 of 97

Q.Consider the given expression: 5<10 and 12>7 or not 7>4 Which of the following will be the correct output, if the given expression is evaluated?

(a) True
(b) False
(c) NONE
(d) NULL
Tamil Nadu DgeCBSE Class XII Board 2023MCQ· 1mImportance★★★★★
62% · 60/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 →

5<10 and 12>7 or not 7>4 groups as ((5<10) and (12>7)) or (not (7>4)) = True or False = True. Correct option: (a) True.

Concept — logical-operator precedence in Python

Among Python's logical operators the precedence order is: not (highest) → and → or (lowest), and all comparison operators (<, >) bind tighter than any of them. So the expression is implicitly bracketed as:

((5 < 10) and (12 > 7)) or (not (7 > 4))

Step-by-step trace

StepEvaluatesResultExpression so far
15 < 10TrueTrue and 12>7 or not 7>4
212 > 7TrueTrue and True or not 7>4
37 > 4TrueTrue and True or not True
4not True (not first)FalseTrue and True or False
5True and True (and next)TrueTrue or False
6True or False (or last)TrueTrue

Run it:

print(5<10 and 12>7 or not 7>4)

Output:

True

(Short-circuit view: the left side of the or is already True, so the whole expression is True no matter what not 7>4 gives.)

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.