# Import the sqrt function from the math module to calculate the square root.
from math import sqrt


# Calculate the length of the hypotenuse using the Pythagorean theorem.
def hypotenuse(a_val, b_val: float) -> float:
    c_val = sqrt(a_val**2 + b_val**2)
    return c_val


# Prompt the user to input the lengths of the shorter triangle sides.
print("Input lengths of shorter triangle sides:")

# Read and convert the input for side 'a' to a floating-point number.
a = float(input("a: "))

# Read and convert the input for side 'b' to a floating-point number.
b = float(input("b: "))


c = hypotenuse(a, b)
# Print the calculated length of the hypotenuse.
print("The length of the hypotenuse is:", c)
