code: def prompt_for_choice(values, message, input_type=int, output_type=None):
      
      output = None
      while not output:
          index = prompt_for_input(message, input_type=input_type)
  
          try:
              output = utf8(values[index])
          except IndexError:
              error_message('Selection out of range')
              continue
  
      if output_type:
          output = output_type(output)
  
      return output
docs: Prints prompt with a list of choices to choose from.