Evaluate each of the following boolean expressions:
4 > 6
5 <= 5
3 == 6
4 != 5
True != True
Evaluate each of the following, keeping in mind order of operations.
10 == 4 + 6
"abc" == "ab" + "c"
'abc' == "abc"
"Scott" == "scott"
(4+3 > 5) == (1.0 > 4)
int(5.6) != int(5.1)
Evaluate the following expressions, writing out each step of simplification after an operator is evaluated to show the order of evaluation as we did in the Bigger Example from the lecture video.
(3 == 5 or (3 != 5 and 5 != 7)) and 3 < 5
11 == 4 ** 2 or 6 != True or not "a" + "b" == "ab"
For each expression below, give in its type and value. The first one is done for you.
True or False
Type: bool
Value: True
True and False or True
Type:
Value:
2**3.0
Type:
Value:
not 1 + 5 // 2 == 3 and 4 < 5 or 4 != 5
Type:
Value: