Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Straight solution in Clear category for Boolean Algebra by Adherent
OPERATION_NAMES = ("conjunction", "disjunction", "implication", "exclusive", "equivalence")
def boolean(x, y, operation):
operations = {"conjunction":'x&y', "disjunction":'x|y', "exclusive":'x^y', "equivalence":'x==y', "implication":'(not x)|y'}
return int(eval(operations[operation]))
Feb. 15, 2016