1
1
Fork 0

updated repository with strict typechecking
Some checks failed
Actions / Lint Code (Ruff & Pylint) (push) Failing after 11s

This commit is contained in:
SeaswimmerTheFsh 2024-05-08 12:43:05 -04:00
parent 14c41cfd45
commit 68569900e0
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F
5 changed files with 30 additions and 24 deletions

View file

@ -12,10 +12,10 @@ def calculate_hypotenuse(x: float, y: float) -> float:
return sqrt(x**2 + y**2)
if __name__ == "__main__":
x = input(f"{BLUE}Input your A:{RESET} ")
y = input(f"{BLUE}Input your B:{RESET} ")
x: str = input(f"{BLUE}Input your A:{RESET} ")
y: str = input(f"{BLUE}Input your B:{RESET} ")
try:
result = calculate_hypotenuse(x,y)
result: float = calculate_hypotenuse(float(x), float(y))
print(f"{GREEN}{round(result)} ({result}){RESET}")
except ValueError:
print(f"{RED}Please do not input strings.{RESET}")