code: def boolean_input(self, question, default=None):
          '''
          Method for yes/no boolean inputs
          '''
          result = input("%s: " % question)
          if not result and default is not None:
              return default
          while len(result) < 1 or result[0].lower() not in "yn":
              result = input("Please answer yes or no: ")
          return result[0].lower() == "yf boolean_input(self, question, default=None):
          '''
          Method for yes/no boolean inputs
          '''
          result = input("%s: " % question)
          if not result and default is not None:
              return default
          while len(result) < 1 or result[0].lower() not in "yn":
              result = input("Please answer yes or no: ")
          return result[0].lower() == "y"
docs: Method for yes/no boolean inputs