def get_yes_no_answer(question):
    """
    Ask user a yes/no-question.

    :param question: The question.
    :type question: str
    :return: The answer.
    :rtype: bool
    """

    while True:

        answer = input(question + " [y/n] ").lower()

        if answer == "y" or answer == "yes":
            return True
        elif answer == "n" or answer == "no":
            return False
        else:
            print("Invalid answer.")