def bool_ans(prompt):
    """
    Handles yes/no input.
    """
    while True:
        response = input(prompt + " [y/n]: ").lower()
        if response == 'y':
            return True
        elif response == 'n':
            return False
        print("Please enter either 'y' or 'n'.")