:
a | b | c | a or c | not(a or c) | not(a or c) and b
0 | 0 | 0 | 0 | 1 | 0
0 | 0 | 1 | 1 | 0 | 0
0 | 1 | 0 | 0 | 1 | 1
0 | 1 | 1 | 1 | 0 | 0
1 | 0 | 0 | 1 | 0 | 0
1 | 0 | 1 | 1 | 0 | 0
1 | 1 | 0 | 1 | 0 | 0
1 | 1 | 1 | 1 | 0 | 0
print(' a | b | c | a or c | not(a or c) | not(a or c) and b')
for a in range(2):
. . . . for b in range(2):
. . . . . . . . for c in range(2):
. . . . . . . . . . . . print("%2d | %d | %d | % 3d | %7d | %9d" % (a,b,c,int(a or c),int(not(a or c)),int(not(a or c) and b)))