Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First (Boolean Algebra) solution in Clear category for Boolean Algebra by psvworks
OPERATION_NAMES = ("conjunction", "disjunction", "implication", "exclusive", "equivalence")
def boolean(x, y, operation):
if operation == "conjunction": return (x and y)
if operation == "disjunction": return (x or y)
if operation == "implication": return (not x or y)
if operation == "exclusive": return ((x or y) and not (x and y))
if operation == "equivalence": return (x == y)
Jan. 31, 2016