Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import *
- def f(x, y, z, w):
- return (not(y)) and x and ((not(z)) or w)
- table = [(0, 1, 0, 0), (1, 1, 0, 0), (1, 1, 1, 0)]
- for p in permutations('wxyz'):
- if [f(**dict(zip(p, r))) for r in table] == [1, 1, 1]:
- print(p)
Advertisement
Add Comment
Please, Sign In to add comment