import re


def ask_yes_no_question(question):
    """
    Asks the user to answer the given question with yes or no.
    Yes, Y, No and N are accepted as valid responses (case insensitive).
    :param question: the question to be answered
    :type question: str
    :return: the user's answer
    :rtype: bool
    """
    do_it = input(question + " (y/n)\n").lower()
    while not re.match("^([yjn]|yes|no)$", do_it):
        do_it = input("Please type y(es) or n(o):\n")
    if re.match("^([yj]|yes)$", do_it):
        return True
    return False