def check_num(prompt: str) -> float:
    """Function to check if users input is a number"""

    while True:
        try:
            num = float(input(prompt))

            return num

        except Exception as e:
            print(e)