def query_float(message: str):
    """Ask the user for a float"""
    while True:
        try:
            user_input = float(input(message))
        except ValueError:
            print('Please enter a valid float.')
            continue
        else:
            return user_input
