Advertisement
technotier

func-rest.py

Dec 17th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. def restaurant_menus():
  2. items_available = [
  3. "chicken",
  4. "fish",
  5. "rice",
  6. "beef",
  7. "vegetables",
  8. ]
  9. customer_ordered_items = []
  10.  
  11. choice = input("Do you want to order ? y / n: ")
  12. while choice == "y":
  13. food_name = input("Enter your item here: ")
  14. if food_name in items_available:
  15. customer_ordered_items.append(food_name)
  16. print("You added", customer_ordered_items)
  17. choice = input("Do you want more ? y / n: ")
  18. else:
  19. print(food_name, "is not available today")
  20. if customer_ordered_items:
  21. print("You items are", customer_ordered_items)
  22. else:
  23. print("You added no items")
  24.  
  25. restaurant_menus()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement