code: def loop_until_valid_response(prompt):
      
      responses = {"Y": True, "YES": True, "TRUE": True,
                   "N": False, "NO": False, "FALSE": False}
      response = ""
      while response.upper() not in responses:
          response = raw_input(prompt)
  
      return responses[response.upper()]
docs: Loop over entering input until it is a valid bool-ish response.
  
      Args:
          prompt: Text presented to user.
  
      Returns:
          The bool value equivalent of what was entered.