def get_float(prompt, lower_bound, upper_bound):
    """Prompt the user for a number and return the number as a float.

    Parameters
        prompt: A string to display to the user.
        lower_bound: The lowest (smallest) number that the user may enter.
        upper_bound: The highest (largest) number that the user may enter.
    Return: The number that the user entered.
    """
    number = None
    while number == None:
        try:
            number = float(input(prompt))
            if number < lower_bound:
                print(f"Error: {number} is too low. Please enter a different number.")
                number = None
            elif number > upper_bound:
                print(f"Error: {number} is too high. Please enter a different number.")
                number = None
        except ValueError as val_err:
            print("Error:", val_err)
    print()
    return number