restaurant order system python code chatgpt

Опубликовано: 12 Октябрь 2024
на канале: UpgradedZero
597
like

RESTAURANT ORDER SYSTEM PYTHON


chatgpt #chatgptexamples #upgradedzero #xero #excel #quickbooks #freeagent #zohobooks #msexcel #AI
#ArtificialIntelligence
#MachineLearning
#NLP#NaturalLanguageProcessing
#DeepLearning
#OpenAI
#LanguageModel
#Chatbot
#VirtualAssistant
#SmartAssistant
#ConversationAI
#LanguageAI
#TextGeneration
#TextCompletion
#QuestionAnswering
#LanguageUnderstanding
#LanguageProcessing
#pandas #python
#css #css3 #html #javascript #scikit #scikitlearn
#pythontutorial
#java #javaprogramming #javatutorial #tkinter #tkintertutorial #csharp














********code********

Define the menu items and their prices
menu = {
"burger": 5.99,
"fries": 2.99,
"drink": 1.99
}

Define an empty order list to hold the customer's selections
order = []

Display the menu and prompt the customer to make a selection
print("Welcome to the restaurant!")
print("Here is our menu:")
for item, price in menu.items():
print(f"{item.capitalize()}: ${price:.2f}")
while True:
choice = input("What would you like to order? (Enter 'done' to finish) ")
if choice == "done":
break
elif choice not in menu:
print("Sorry, that item is not on the menu. Please try again.")
else:
order.append(choice)

Calculate the total cost of the order
total = sum([menu[item] for item in order])

Display the customer's order and total cost
print("Here is your order:")
for item in order:
print(item.capitalize())
print(f"Your total is ${total:.2f}. Thank you for your order!")