code: def yes_or_no(message):
      
      while True:
          print message, '(yes/no)',
          line = raw_input()
          if line is None:
              return None
          line = line.lower()
          if line == 'y' or line == 'ye' or line == 'yes':
              return True
          if line == 'n' or line == 'no':
              return False
docs: Gets user input and returns True for yes and False for no.