Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Boolean Algebra by akaka
OPERATION_NAMES = {
"conjunction":lambda a,b: a&b,
"disjunction":lambda a,b: a|b,
"implication":lambda a,b: (a^True)|b,
"exclusive" :lambda a,b: a^b,
"equivalence":lambda a,b: (a^True)^b
}
def boolean(x, y, operation):
return OPERATION_NAMES[operation](x,y)
Oct. 17, 2018