@ -21,3 +21,10 @@ def identity(first_input, operator, second_input):
return identity_disconjunctive(first_input, second_input)
else:
return identity_conjunctive(first_input, second_input)
def one_zero(first_input, second_input):
if first_input == 0 and second_input == 0:
return None
return 1
@ -33,6 +33,9 @@ class calculationsWithRoots(unittest.TestCase):
def test_identity_1_and_1_equals_1(self):
self.assertEqual(identity(1, ".", 1), 1)
def test_one_zero_1_or_1_equals_1(self):
self.assertEqual(one_zero(1, 1), 1)
if __name__ == "__main__":
unittest.main()