Browse Source

refactoring: optimized identity_disconjunctive

remotes/origin/feature/feature-logical-operations
fdai7783 11 months ago
parent
commit
bfc885cbb1
  1. 12
      src/main/py/logical_operations.py

12
src/main/py/logical_operations.py

@ -1,10 +1,10 @@
def identity_disconjunctive(variable, operator, zero):
if zero == 0 and operator == "+":
return variable
elif variable == 0 and zero == 1:
return 1
else:
def identity_disconjunctive(first_input, operator, second_input):
if first_input == 1 and second_input == 1:
return None
elif first_input == 0 and second_input == 0:
return 0
else:
return 1
def identity_conjunctive(variable, operator, zero):

Loading…
Cancel
Save