def integer_question(question):
    """
    Ask for user input requiring an integer answer.

    :param question:
    :return:
    """
    while (True):
        print('\nPlease enter answer as an integer.')
        raw_answer = input(question + '\n')

        try:
            answer = int(raw_answer)
        except ValueError:
            print('ERROR: invalid answer.  Please try again.\n')
            continue

        if isinstance(answer, int) and answer >= 0:
            break

    return answer