def prompt_int(prompt):
    """ Prompt until the user provides an integer. """
    while True:
        try:
            return int(input(prompt))
        except ValueError as e:
            print('Provide an integer')