0
Can't understand the output of the following code?
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
+ 3
< redacted, maybe my explanation wasn't 100% correct 😩>
+ 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.