1
1
Fork 0

pylint fix
All checks were successful
Actions / Lint Code (Ruff & Pylint) (push) Successful in 10s

This commit is contained in:
Seaswimmer 2024-05-08 12:14:29 -04:00
parent a7581a0bf6
commit c55a25d874
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -2,15 +2,15 @@ from math import sqrt
def calculate_hypotenuse(x: float, y: float) -> float:
x = float(x)
y = float(y)
return sqrt(x**2 + y**2)
x = float(x)
y = float(y)
return sqrt(x**2 + y**2)
if __name__ == "__main__":
x = input("Input your A: ")
y = input("Input your B: ")
try:
result = calculate_hypotenuse(x,y)
print(f"{round(result)} ({result})")
except ValueError:
print("Error! Please do not input strings.")
x = input("Input your A: ")
y = input("Input your B: ")
try:
result = calculate_hypotenuse(x,y)
print(f"{round(result)} ({result})")
except ValueError:
print("Error! Please do not input strings.")