<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def yesno(self, prompt, error='Please type either y or n', intro=None, default=None):
 """ Ask user for yes or no answer The prompt will include a typical '(y/n):
' at the end. Depending on whether ``default`` was specified, this may also be '(Y/n):
' or '(y/N):
'. The ``default`` argument can be ``True`` or ``False``, with meaning of 'yes' and 'no' respectively. Default is ``None`` which means no default. When default value is specified, malformed or empty response will cause the ``default`` value to be returned. Optional ``intro`` text can be specified which will be shown above the prompt. """

        if default is None:
            prompt += ' (y/n):'
        else:
            if default is True:
                prompt += ' (Y/n):'
                default = 'y'
            if default is False:
                prompt += ' (y/N):'
                default = 'n'
        validator = lambda x: x in ['y', 'yes', 'n', 'no']
        val = self.rvpl(prompt, error=error, intro=intro, validator=validator,
                        clean=lambda x: x.strip().lower(),
                        strict=default is None, default=default)
        return val in ['y', 'yes']