2(viii)
What will be the output of the following Python code?
a = 5 b = 3 print(a > b and b < 3)
Show SolutionHide Solution↓
False
Given: a = 5, b = 3
Evaluate the expression: a > b and b < 3
a > b→5 > 3→ Trueb < 3→3 < 3→ False
Now, True AND False → False (The AND operator returns True only when both conditions are True, otherwise, it returns False.)
Hence, the output is False.