Ad

now you can set how many decimal place you want

Code
Diff
  • def hypotenuse(a,b,decimalPlace = 4):
        return round((a**2 + b**2)**0.5, decimalPlace)
    • def hypotenuse(a,b):
    • return round((a**2 + b**2)**0.5,4)
    • def hypotenuse(a,b,decimalPlace = 4):
    • return round((a**2 + b**2)**0.5, decimalPlace)