Report Bug
Qus :

What is the output?

x = 5
y = 10
print(x > 3 or y < 5 and x == 5)

Qus

निम्न code का output क्या होगा?

x = 5
y = 10
print(x > 3 or y < 5 and x == 5)


A. True
B. False
C. Error
D. None


Solution
A. True



Explanation
and is evaluated before or. x > 3 is already True, so the complete OR expression is True. <br><br>and की precedence or से अधिक है। x > 3 True है, इसलिए पूरी expression True होती है।



Report Bug