Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Eval solution in Speedy category for Boolean Algebra by Pavellver
OPERATIONS = {
"conjunction": "and",
"disjunction": "or",
"implication": "<=",
"exclusive": "^",
"equivalence": "==",
}
def boolean(x: bool, y: bool, operation: str) -> bool:
return eval(f'{x} {OPERATIONS[operation]} {y}')
May 18, 2023
Comments: