Browse Source

refactoring: Made the multiplyRoots function use the already implemented function for calculating square roots

remotes/origin/feature/feature-calculations_with_roots
fdai7764 11 months ago
parent
commit
fe0d79ac5c
  1. 4
      src/main/py/calculations_with_roots.py

4
src/main/py/calculations_with_roots.py

@ -1,6 +1,6 @@
import math
from src.main.py.logarithmic_and_expo_and_root_calculations import sqrt
def multiplyRoots(first_number, second_number): def multiplyRoots(first_number, second_number):
if first_number < 0 or second_number < 0: if first_number < 0 or second_number < 0:
return -1 return -1
return math.sqrt(first_number * second_number)
return sqrt(first_number * second_number)
Loading…
Cancel
Save