Logical operations are one of the most fundamental skills to examine our logical capabilities:
First we need to know the meaning of these three words and or not
And: And
Or: OR
Not: True or FALSE, true or false
Boolean operations:
And: Both values are true and the result of the operation is true and true =true as long as there is a false: true and False=false
Or: Both ends as long as one is true is true: TRUE or false=true as long as one is true
Not True=false, not false=true
The order of operations for and or not.
Order of Operations () >not>and>or
Logical operation:
Or: If two numbers do a logical operation such as x or Y. If x =0 then the result is Y. If x>0 is X
And: In contrast to or
Practice:
1), 6 or 2 > 1 6
2), 3 or 2 > 1 3
3), 0 or 5 < 4 False
4), 5 < 4 or 3 3
5), 2 > 1 or 6 True
6), 3 and 2 > 1 True
7), 0 and 3 > 1 0
8), 2 > 1 and 3 3
9), 3 > 1 and 0 0
10), 3 > 1 and 2 or 2 < 3 and 3 and 4 or 3 > 2 2
Python learning [logical operations]