0

Can't understand the output of the following code?

https://code.sololearn.com/cm13jZe8wRUv/?ref=app

19th Jan 2019, 2:20 PM
Ashutosh Dash
Ashutosh Dash - avatar
3 Respostas
+ 8
http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html not 1 + 1 == y or x == 4 and 7 == 8 not 2 == y or x == 4 and 7 == 8 not True or True and False False or True and False False or False False
19th Jan 2019, 3:03 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 3
< redacted, maybe my explanation wasn't 100% correct 😩>
19th Jan 2019, 2:26 PM
Anna
Anna - avatar
+ 3
Anna "7 == 8 is False, so the whole expression is False". What about this? if 1 + 1 == y or x == 4 and 7 == 8: print("Yes") elif x > y: print("No") 7 == 8 is False but the whole expression is True.
19th Jan 2019, 2:47 PM
Diego
Diego - avatar