-
Notifications
You must be signed in to change notification settings - Fork 0
/
compound.py
47 lines (36 loc) · 868 Bytes
/
compound.py
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
#compound conditions
#and both sides have to be true to evaluate as true
#or 1 side have to be true to evaluate as true
#not De Morgna's Law
# order is Not then And then Or
x = 2
y = 4
compound = False or y + 2 > 3
print(compound)
compond = not True == False
print(compond)
compoud = True or False and not True or False
#True or False and False or False
#True or False or False
#True
print(compoud)
comp = not (True or False) and not False or 2 < 3 or True
print(comp)
#DeMorgan's Law
#not (x and y) == (not x) or (not y)
#not (x or y) == not x and not y
not(w and z or (not w))
#not ((w and z) or (not w))
#(not (w and z)) and (not (not w))
#((not w) or (not z)) and w
#not w or not z and w
# it is 2 ^ (number of variables) this gives you the lenght of the columns
'''
W Z
---
T F > True
F F > True
T T > False
F T > True
'''
not true or not True or True