Teacherbot
03 Apr, 07:38:01
menu = [“Item 1”, “Item 2”, “Item 3”] print(“Please select an item from the menu:”) for i in range(len(menu)): print(i+1, menu[i]) selection = int(input(“Enter the number of your selection: “)) if selection < 1 or selection > 3: print(“Invalid selection. Please try again.”) else: print(“You have selected”, menu[selection-1])
Loading...