<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_bool(answer, default):
 """ Converts user answer to boolean """

    answer = str(answer).lower()
    default = str(default).lower()

    if answer and answer in "yes":
        return True

    return False