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: def calculate_hypotenuse(x: float, y: float) -> float:
x = float(x) x = float(x)
y = float(y) y = float(y)
return sqrt(x**2 + y**2) return sqrt(x**2 + y**2)
if __name__ == "__main__": if __name__ == "__main__":
x = input("Input your A: ") x = input("Input your A: ")
y = input("Input your B: ") y = input("Input your B: ")
try: try:
result = calculate_hypotenuse(x,y) result = calculate_hypotenuse(x,y)
print(f"{round(result)} ({result})") print(f"{round(result)} ({result})")
except ValueError: except ValueError:
print("Error! Please do not input strings.") print("Error! Please do not input strings.")