# function to check for yes or no input def string_checker(question, valid_ans): while True: error = f"enter a valid option from {valid_ans}" user_response = input(question).lower() for item in valid_ans: # check if user response is a valid answer if item == user_response: return item elif user_response == item[0]: return item print(error) print() # function to check string is not empty def not_blank(question): error = "Enter a name" while True: user_name = input(question) if user_name != '': return user_name else: print(error) # variables yes_no = ["yes", "no"] deliv_option = ["delivery", "pick up"] # Welcome message print("<---Welcome to Puppet Pizzaria--->") print() delivery = string_checker("Is this order to pick or delivery? ", deliv_option) if delivery == "delivery": print("There is a $10 surcharge for delivery") # Do you want the Menu? # Ask for name and details name = not_blank("Enter your name ") print(f"Hello {name} ") print() want_menu = string_checker("Would you like the menu? ", yes_no) if want_menu == "yes": print("|---------------π™Όπ™΄π™½πš„---------------|") print("1 - Ham & Cheese Pizza") print(" - Regular (20 cm): $8.99") print(" - Large (30 cm): $12.99") print(" - XL (35 cm): $14.99") print() print("2. Cheese Lovers Pizza") print(" - Regular (20 cm): $8.99") print(" - Large (30 cm): $12.99") print(" - XL (35 cm): $14.99") print() print("3. Supreme Pizza") print(" - Regular (20 cm): $9.99") print(" - Large (30 cm): $14.99") print(" - XL (35 cm): $17.99") print() print("4. Meat Lovers Pizza") print(" - Regular (20 cm): $10.99") print(" - Large (30 cm): $15.99") print(" - XL (35 cm): $18.99") print() print("5. Veggie Supreme Pizza") print(" - Regular (20 cm): $9.99") print(" - Large (30 cm): $14.99") print(" - XL (35 cm): $17.99") print() print("6. BBQ Chicken Pizza") print(" - Regular (20 cm): $10.99") print(" - Large (30 cm): $15.99") print(" - XL (35 cm): $18.99") print() print("7. Hawaiian Pizza") print(" - Regular (20 cm): $9.99") print(" - Large (30 cm): $13.99") print(" - XL (35 cm): $16.99") print() print("8. Margherita Pizza") print(" - Regular (20 cm): $8.99") print(" - Large (30 cm): $12.99") print(" - XL (35 cm): $14.99") print() print("9. Buffalo Chicken Pizza") print(" - Regular (20 cm): $10.99") print(" - Large (30 cm): $15.99") print(" - XL (35 cm): $18.99") print() print("10. Mediterranean Pizza") print(" - Regular (20 cm): $10.99") print(" - Large (30 cm): $15.99") print(" - XL (35 cm): $18.99") print() print("11. Pepperoni Lover's Pizza") print(" - Regular (20 cm): $9.99") print(" - Large (30 cm): $14.99") print(" - XL (35 cm): $17.99") print() print("12. Ultimate Cheese Lover's Pizza") print(" - Regular (20 cm): $8.99") print(" - Large (30 cm): $12.99") print(" - XL (35 cm): $14.99") print() print("13. Super Supreme Pizza") print(" - Regular (20 cm): $10.99") print(" - Large (30 cm): $15.99") print(" - XL (35 cm): $18.99") print() print("14. Veggie Lover's Pizza") print(" - Regular (20 cm): $9.99") print(" - Large (30 cm): $14.99") print(" - XL (35 cm): $17.99") print() print("15. Chicken Supreme Pizza") print(" - Regular (20 cm): $10.99") print(" - Large (30 cm): $15.99") print(" - XL (35 cm): $18.99") print() print("16. Spinach Alfredo Pizza") print(" - Regular (20 cm): $9.99") print(" - Large (30 cm): $13.99") print(" - XL (35 cm): $16.99") print() print("17. Italian Sausage Pizza") print(" - Regular (20 cm): $9.99") print(" - Large (30 cm): $13.99") print(" - XL (35 cm): $16.99") print() print("18. Bacon Spinach Alfredo Pizza") print(" - Regular (20 cm): $10.99") print(" - Large (30 cm): $15.99") print(" - XL (35 cm): $18.99") print() print("19. Garlic Parmesan Pizza") print(" - Regular (20 cm): $9.99") print(" - Large (30 cm): $13.99") print(" - XL (35 cm): $16.99") print() print("20. Four Cheese Pizza") print(" - Regular (20 cm): $8.99") print(" - Large (30 cm): $12.99") print(" - XL (35 cm): $14.99") print()