print('1. Eggs') print('2. Pancakes') print('3. Waffles') print('4. Oatmeal') MainChoice = int (input('Choose a breakfast item:')) if (MainChoice == 1): Egg_Styles = ['1. Easy','2. Medium','3. Well Done'] print('Got that') print Egg_Styles[0] print Egg_Styles[1] print Egg_Styles[2] EggStyle = int(input('How would you like your eggs?')) if (EggStyle == 1 or EggStyle == 2 or EggStyle == 3): print('Got that.') else: print('Sorry. We cannot cook your eggs that way.') Side_Eggs = ['1. Bread','2. Biscuit','3. Other Side'] print Side_Eggs[0] print Side_Eggs[1] print Side_Eggs[2] Side_of_Eggs = int(input('What side would you like with your eggs?')) if (Side_of_Eggs == 1): Bread_Choices = ['1. White Bread','2. Whole Wheat Bread'] print('Got that.') print Bread_Choices[0] print Bread_Choices[1] Q_Bread_Choices = int(input('What kind of toasted bread do you want?')) if (Q_Bread_Choices == 1 or Q_Bread_Choices == 2): print('Got that.') print 'You are having eggs cooked ' + Egg_Styles[EggStyle - 1[3:] + ' with a side of toasted ' + Bread_Choices[Q_Bread_Choices - 1[3:]] + '.' else: print('We do not have that bread choice.')
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