+ 1

I want to know why this is not showing correct .... output will be (True False True) & I have same result but it's not showing

score = 120 if 120 > 100: print("True") scorea = 88 if 88 > 100: print("True") else: print("False") scoreb = 101 if 101 > 100: print("True")

26th Jul 2023, 3:15 PM
Tavishi Srivastava
Tavishi Srivastava - avatar
2 Respuestas
+ 5
What do you expect?
26th Jul 2023, 3:18 PM
A͢J
A͢J - avatar
+ 3
I don't know what you expect the output. But the output will be True False True. Reason: In the first case 120 is bigger than 100.So the output will True. In the second case 88 is not bigger than 100.That's why it will be False. And in the last 101 is bigger than 100.So the output will True. So the final output will be - True False True
26th Jul 2023, 3:36 PM
Gulshan Mahawar
Gulshan Mahawar - avatar