input: Write a function to create a menu interface that prompts the user to select an option from a given list of options.
  assert createUI(["Create", "Update", "Delete", "Retrieve", "Quit"]) in range(1, 6)
  assert createUI(["Start", "Stop", "Pause"]) in range(1, 4)
  assert createUI(["Yes", "No"]) in range(1, 3)
output: def createUI(options):
      while True:
          print("Select an option:")
          for i, option in enumerate(options, 1):
              print(f"{i}. {option}")
          try:
              choice = int(input("Enter the number of your choice: "))
              if 1 <= choice <= len(options):
                  return choice
              else:
                  print("Invalid choice. Please select a valid option.")
          except ValueError:
              print("Invalid input. Please enter a number.")