Text Size
Text Size
Exit Full Screen
Python Mini
Show
Source Code
View Source Code in Full Screen
Open in New Tab
totalPrice = 0.00 notDone = True while notDone: order = raw_input("please order from the following list of items: [Popcorn chicken - $1.00], [Chicken Wings - $5,00], [Fried Chicken - $10.50], [Roast Chicken - $20.25], [Chicken Nugget - $2.00], [Gold Nugget - $50,000.00]. Enter ''done'' to complete order. ALL ENTRIES MUST BE IN ALL LOWERCASE") order = order.lower() if order == "popcorn chicken": print "Popcorn chicken - $1.00" totalPrice += 1.00 elif order == "chicken wings": print "Chicken wings - $5.00" totalPrice += 5.00 elif order == "fried chicken": print "Fried chicken - $10.50" totalPrice += 10.50 elif order == "roast chicken": print "Roast chicken - $20.25" totalPrice += 20.25 elif order == "chicken nugget": print "Chicken nugget - $2.00" totalPrice += 2.00 elif order == "gold nugget": print "Authentic California Gold Nugget - $50,000.00" totalPrice += 50000.00 else: if order == "done": print "Your Total is $", totalPrice print "Have a nice day!" notDone = False
ch_menu.py
( around 28 lines python code )
Published By:
EM5700
Published on
2019-09-20T13:02:03Z
Python Mini
- an
OYOclass
application,
own your own class today
.
Run
Result
×
Error message shows here