Browse Source

Added multiplication functionality and a test for it

remotes/origin/feature/feature-primitive-calculations
fdai7783 11 months ago
parent
commit
d2dc6dc08b
  1. 4
      src/main/py/primitive_calculations.py
  2. 3
      src/test/py/test_primitive_calculations.py

4
src/main/py/primitive_calculations.py

@ -4,3 +4,7 @@ def add(first_number, second_number):
def subract(first_number, second_number):
return second_number - first_number
def multiply(first_number, second_number):
return first_number * second_number

3
src/test/py/test_primitive_calculations.py

@ -27,6 +27,9 @@ class primitive_calculations(unittest.TestCase):
def test_subtract_minus_5_minus_minus_5_equals_0(self):
self.assertEqual(subract(-5, -5), 0)
def test_subtract_minus_5_minus_minus_5_equals_1(self):
self.assertEqual(multiply(5, 5), 25)
if __name__ == "__main__":
unittest.main()
Loading…
Cancel
Save