herb_and_chilli_camanari = 450 pherb_and_chilli_camanari = ("£4.50") spicy omlette = 400 pspicy_omlette = ("4.00") lentil_soup = 400 plentil_soup = ("£4.00") beef_burger = 500 pbeef_burger = ("£5.00") chicken_burger = 500 pchicken_burger = ("5.00") cheese_and_onion = 500 pcheese_and_onion = ("£5.00") vegan_burger = 500 pvegan_burger = ("5.00") treacle_tart = 300 ptreacle_tart = ("£3.00") banana_split = 300 pbanana_split = ("£3.00") chocolate_fudge_cake = 350 pchocolate_fudge_cake = ("£3.50") print ("Good Evening. My name is Lily. What is your name?") name=input() print ("Lovely, it is great to meet you, "+name) print ("How many guests have you brought along with you?") covers=input() print ("Great!") print ("Would you like to take a look at our menu? Please answer 'Yes' or 'No'.") menu=input() if menu =="Yes": print ("Awesome! For starters we have herb and chilli camanari, spicy omlette, lentil soup") print ("Our burgers: Beef, Chicken, Cheese&Onion, Vegan") print ("Our desserts: Treacle tart, banana split, chocolate fudge cake") elif menu =="No": #take choices for main course print ("Ok. May I take your order for starters?") choice_1=input() print ("Anything else?") choice_2=input() print ("And last but not least, what would you like for dessert?") choice_3=input() print ("thats sounds great! it will be with you shortly.") #process choice 1 if choice_1=="Herb and chilli camanari": cost_1 = herb_and_chilli_camanari print ("that will be "+pherb_and_chilli_camanari + ") elif choice_1 == "Spicy omlette": cost_1 = spicy_omlette print ("that will be "+pspicy_omlette + ") elif choice_1 == "Lentil soup" cost_1 = lentil_soup print ("that will be "+plentil_soup + ") #process choice 2 if choice_2 == "Beef burger" cost_2 = beef_burger print ("that will be "+pbeef_burger + ") elif choice_2 == "Chicken Burger" cost_2 = chicken_burger print ("that will be "+pchicken_burger + ") elif choice_2 == "Cheese&Onion Burger" cost_2 = cheese_and_onion print ("that will be "+pcheese_and_onion + ") elif choice_2 == "Vegan Burger" cost_2 = vegan_burger print ("that will be "+pvegan_burger + ") #process choice 3 if choice_3 == "Treacle tart" cost_3 = treacle_tart print ("that will be "+ptreacle_tart +") elif choice_3 == "Banana Split" cost_3 = banana_split print ("that will be "+pbanana_split + ") elif choice_3 == "Chocolate Fudge Cake" cost_3 = chocolate_fudge_cake print ("that will be "+pchocolate_fudge_cake + ") #calculate total bill total=cost_1 + cost_2 + cost_3 totalcost+total/100 print ("Your bill comes to:") print ("£(:,.2f)".format(totalcost) print ("Thank you for coming! We hope to see you again!")
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question