0
Can anyone please explain this to me?
print(False == (False or True)) Output: False
16 Respostas
+ 4
false or true give you true
true is not equal to false
so false == true gives false and that will be print
+ 6
False == (False or True)
(False or True) -> True
False == True -> False
+ 2
This is known as precedence of operators. Brackets first.
False or True gives True
False== True gives False
+ 1
Yes sir
+ 1
Thank you scorpion sir
+ 1
ABHIRAJ SRIVASTAVA you are welcome
+ 1
The or operator returns True if at least one of the expressions is True otherwise it returns False.
I think it is better you understand it rather than just memorizing the truth table
0
Sir From this only i asked this qusetion .......
0
Ok
False or true \\ true
False == true \\ false
Do you understand
0
I am just having problem with this
True or False
.......
while printing
0
Bagon sir can you explain me how
(False or True )
Gives true?
0
ABHIRAJ SRIVASTAVA now you have to learn that lesson
0
But how , i am not understanding this one , when i was going ahead it was easy for me to do practice and module questions sir .
But i want to understand this.......
0
ok I have a good view. take a balance , think it as OR balance. Now if you have truth in any of its arm, it will show you are telling truth. If you have false on both sides, of course you are telling false. Hence in your case, there was truth somewhere, hence result is true.