diff --git a/2-variables/09_hypotenuse.py b/2-variables/09_hypotenuse.py index eb6b9e7..7fedd7c 100644 --- a/2-variables/09_hypotenuse.py +++ b/2-variables/09_hypotenuse.py @@ -4,6 +4,8 @@ a = int(input("Enter a: ")) b = int(input("Enter b: ")) -c = (a**2 + b**2) ** 0.5 - -print(c) +if a > 0 and b > 0: + c = (a**2 + b**2) ** 0.5 + print("Hypotenuse is:", c) +else: + print("Please enter positive numbers")