0
the sequence of this code if not 1 +1 ==y or x ==4 and 7 ==8
3 Réponses
+ 3
when you need to know precedence of logical operations, treat 'or' as '+', and 'and' as '*', and then apply the rules of common math.
in logical math 'or' is also called 'logical addition', and 'and' is called 'logical multiplication'
you can also use parentheses to set your own desired precedence
+ 2
What are the values of x and y.
Here is the python reference for operator precedence. section 6.16
https://docs.python.org/3/reference/expressions.html#operator-precedence
+ 1
Inagine anf statements as having () sround them. Like 1+1==y or (x==y and x>6) or whatever. Ofer of operations says parenthesis are evaluated first. Just inagine they surround and statements abd its easier to visualize