Test Index

CBSE Class 12 Computer Science 2026 Paper Set 4 Get it on Google PlayDownload on the App Store

© examsnet.com
Question : 3 of 37
Marks: +1, -0
Which of the following expressions in Python evaluates to True ?
Solution:  
Concept:
x and y: if x is false, the result is x; otherwise the result is y (the second operand itself, not necessarily True/False).
Explanation:
(A) 2>3 is False, so the result is False.
(B) 3>1 is True, so the result is the second operand 2 (an int, not True).
(C) 3>1 is True, so the result is 3>2 = True.
(D) 3>1 is True, so the result is 3<2 = False.
>>> 3>1 and 2
2
>>> 3>1 and 3>2
True
Key point: Option (B) gives 2, which is only truthy (it would act as true in an if); the expression that evaluates to the value True itself is (C).
Answer:
Option C (3>1 and 3>2)
© examsnet.com
Advertisements
Go to Question: