Why is False == (False or True) --> False | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why is False == (False or True) --> False

This seems to me that this equation would look at whether (False or True) were equal to False. By that logic this would return True. I must be missing something.

6th Sep 2016, 12:56 PM
justin
justin - avatar
5 Answers
+ 3
First of all parantheses (False || True) this equals True. Then python checks False == True "False is equal to True?" answer is no, so its false.
6th Sep 2016, 1:05 PM
Muhammed
+ 3
False or true gives true buddy @ justin
6th Sep 2016, 3:32 PM
Abhi Ram
Abhi Ram - avatar
0
because first it checks (False||True) and it is or operator,it means + operation for example 1+0=1 so true and then it check for False==True obvisouly it is False so it returns False
9th Oct 2016, 6:56 PM
N.MANASA
0
parentheses first so (False or True) would be true because it's true if one is true and then as that's the case it won't be equal to False. so it's False haha python is mad. I'm loving it
31st Oct 2016, 10:52 PM
James
James - avatar
- 1
because false in the left is NOT equal true in the right(answer of "false or true")
11th Sep 2016, 6:57 AM
Mohammad Ghaznavi
Mohammad Ghaznavi - avatar