Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Boolean Algebra by thealfest1
OPERATION_NAMES = ("conjunction", "disjunction", "implication", "exclusive", "equivalence")
def boolean(x, y, operation):
FUNCTIONS = (x and y, x or y, y==1 if x else not x, x != y, x == y)
return FUNCTIONS[OPERATION_NAMES.index(operation)]
Feb. 18, 2019