Mar-05-2020, 07:26 PM
Thank you Buran. I understand that and will keep that in consideration as I progress. As of now, I am at the very rudimentary levels so just want to ensure syntax and logic align. I'm aware of string formatting (.upper(), .lower(), etc.) but wanted to keep the ex as basic as possible. The class has not addressed f-strings or lists yet. I still don't understand why my program is incorrect. The lab requires me to:
Quote:get user input for add_item variable
new_menu use string addition to add add_item to menu
print the new_menu
testing
check if an item is on the menu, check for previous items and the item you added
# add to menu
# Testing Add to Menu - create user input to search for an item on the new menu
print(menu) add_item = input("What would you like to add? ") new_menu = menu + ", " + add_item
Output:salad, pasta, sandwich, pizza, drinks, dessert
What would you like to add? soup
print(new_menu) menu_ask = input("What would you like to order from the new menu? ") print(menu_ask, "in the new menu = ",menu_ask in menu)
Output:salad, pasta, sandwich, pizza, drinks, dessert, soup
What would you like to order from the new menu? soup
soup in the new menu = False