forked from ernestas-poskus/interactive-programming-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboolean_operators.py
More file actions
57 lines (29 loc) · 849 Bytes
/
boolean_operators.py
File metadata and controls
57 lines (29 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"""
Boolean Operators
---------------------------
True and True is True
True and False is False
False and True is False
False and False is False
True or True is True
True or False is True
False or True is True
False or False is False
Not True is False
Not False is True
"""
bool_one = False and False
bool_two = -(-(-(-2))) == -2 and 4 >= 16**0.5
bool_three = 19 % 4 != 300 / 10 / 10 and False
bool_four = -(1**2) < 2**0 and 10 % 10 <= 20 - 10 * 2
bool_five = True and True
bool_one = 2**3 == 108 % 100 or 'Cleese' == 'King Arthur'
bool_two = True or False
bool_three = 100**0.5 >= 50 or False
bool_four = True or True
bool_five = 1**100 == 100**1 or 3 * 2 * 1 != 3 + 2 + 1
bool_one = not True
bool_two = not 3**4 < 4**3
bool_three = not 10 % 3 <= 10 % 2
bool_four = not 3**2 + 4**2 != 5**2
bool_five = not not False