print("%1d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%5d%5d" % (a,b,c,int(not a),int(not a or c),int(a and c),int(not(a and c)),int((not a or c)and(not(a and c))),int(not c),int(b or not c),int((not a or c)and(not(a and c))and(b or not c)),int(b and c),int(not(b and c)),int((not a or c)and(not(a and c))and(b or not c)and(not(b and c)))))
print()
print ("1 - не a, 2 - не a v c, 3 - a*c,4 - не(a*c), 5 - (не a v c)*(не(a*c)), 6 - не c, 7 - b v не c, 8 - (не a v c)*(не(a*c))*(b v не c)")
print ("9 - b*c, 10 - не(b*c), 11 - (не a v c)*(не(a*c))*(b v не c)*(не(b*c))")
скрин
Объяснение:
print ("a | b | c | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11")
for a in range (2):
for b in range (2):
for c in range(2):
print("%1d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%4d%5d%5d" % (a,b,c,int(not a),int(not a or c),int(a and c),int(not(a and c)),int((not a or c)and(not(a and c))),int(not c),int(b or not c),int((not a or c)and(not(a and c))and(b or not c)),int(b and c),int(not(b and c)),int((not a or c)and(not(a and c))and(b or not c)and(not(b and c)))))
print()
print ("1 - не a, 2 - не a v c, 3 - a*c,4 - не(a*c), 5 - (не a v c)*(не(a*c)), 6 - не c, 7 - b v не c, 8 - (не a v c)*(не(a*c))*(b v не c)")
print ("9 - b*c, 10 - не(b*c), 11 - (не a v c)*(не(a*c))*(b v не c)*(не(b*c))")