def boolean_input(self, question, default=None):
result = input("<STR_LIT>" % question)<EOL>if not result and default is not None:<EOL><INDENT>return default<EOL><DEDENT>while len(result) < <NUM_LIT:1> or result[<NUM_LIT:0>].lower() not in "<STR_LIT>":<EOL><INDENT>result = input("<STR_LIT>")<EOL><DEDENT>return result[<NUM_LIT:0>].lower() == "<STR_LIT:y>"<EOL>
Method for yes/no boolean inputs