Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Boolean Algebra by lij
OPERATION_NAMES = ("conjunction", "disjunction", "implication", "exclusive", "equivalence")
def boolean(x, y, t):
operations = [x&y, x|y, (not x)|y , x^y, x==y]
return {name:op for name,op in zip(OPERATION_NAMES,operations)}[t]
Feb. 2, 2018