def PizzaPizzaF(): meal=raw_input("In Pizza Pizza, what meal do you want to get? A personal pizza, a sandwich, or a large pizza?") print "-->", meal side=raw_input("What side do you want with that? Salad, coffe, or a cookie?") print "-->", side def CupcakeIncF(): #Emma isn't a cupcake meal=raw_input("In Cupcakes Inc, what meal do you want to get? A chocolate cupcake, the vanila cupcake set, or the oreo surprize?") print "-->", meal side=raw_input("What side do you want with that? Ice cream, coffe, or a cookie?") print "-->", side def ChocolateFactoryF(): meal=raw_input("In The Chocolate Factory, what meal do you want to get? Chocolate cake, white chocolate mosse, or chili chocolate speciality?") print "-->", meal side=raw_input("What side do you want with that? An ice cream, hot chocolate, cookie") print "-->", side #main meal="whatever you want" side="as you wish" print "Please choose an answer for each question (no capitals please!)" resturant= raw_input("What resturant do you want to go to? Pizza Pizza, Cupcakes Inc, or The Chocolate Factory?") print "-->", resturant if 'pizza pizza' in resturant: PizzaPizzaF() elif 'cupcakes' in resturant: CupcakeIncF() elif 'factory' in resturant: ChocolateFactoryF() print "At", resturant, "you have ordered a", meal, "with a", side #Raman is almost as good as chocolate raw_input("/n/nPress the Enter key to exit")
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