+ 3

i don't get it :/

Why print(True == False or True) is True Pls help thank you

13th Jan 2017, 1:29 PM
Tonniez S.
Tonniez S. - avatar
6 Answers
+ 9
True == False or True => *(True == False returns False)* False or True => True .
13th Jan 2017, 1:31 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 5
When we have "or": True or True = True True or False = True False or False = False
13th Jan 2017, 10:59 PM
iamaprogrammer
+ 3
thank you :))
14th Jan 2017, 3:02 AM
Tonniez S.
Tonniez S. - avatar
0
LOGIC IN "AND" and "OR": on "AND" if there is False on the comparison, it always return to false on "OR" if there is TRUE on the comparison, it always return to True
17th Jan 2017, 10:27 AM
Darwin Fegarido
Darwin Fegarido - avatar
0
It's in OR logic ... (True == False or True) True value is 1 False value is 0 So .. //OR logic=>0+1=1 ( 1 == 0 or 1 ) ans is true !
19th Jan 2017, 12:44 PM
Murali S
Murali S - avatar
0
== has higher precedence than logical or so 1.(true==false) gives false 2.((true== false) or true) (false or true) gives true
1st Feb 2017, 8:23 AM
lot us
lot us - avatar