Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Boolean Algebra by gyahun_dash
from operator import and_, or_, eq, xor
operations = dict(conjunction = and_, disjunction = or_, equivalence = eq,
exclusive = xor, implication = lambda x, y: not x or y)
def boolean(x, y, operation):
return operations[operation](x, y)
Sept. 3, 2014
Comments: