Example #1
0
 def select_topping():
     """
     Prompt user with a topping list, and return the selected topping.
     :return: None or Topping object
     """
     question = f"\nStep 2: Select your topping!\n{'-'*40}\n"
     i = 1
     for topping in ToppingMenu.topping_list:
         question += f"{i}. {topping}\n"
         i += 1
     question += f"{i}. Check Out\n{'-'*40}\nPlease select: "
     return InputHandler.prompt_menu(question, ToppingMenu.topping_list)
Example #2
0
 def select_cheese():
     """
     Prompt user with cheese list, and return the selected cheese.
     :return: Cheese object
     """
     question = f"\nStep 1: Select your cheese!\n{'-'*40}\n"
     i = 1
     for cheese in CheeseMenu.cheese_list:
         question += f"{i}. {cheese}\n"
         i += 1
     question += f"{i}. Next\n{'-'*40}\nPlease select: "
     return InputHandler.prompt_menu(question, CheeseMenu.cheese_list)