Question: So this program works but I need it to repeat so the next customer can order. I ' m guessing wrap it in a loop.
So this program works but I need it to repeat so the next customer can order. Im guessing wrap it in a loop. Is there an easy way to add the loop to my existing code or do I have to rewrite the entire thing? Please help!
# Create code for Billy's Food Truck
Welcome customer
import time
printThank you for choosing Billy's Food Truck for your dining pleasure today!
print
# Display menu
printFood plate #wings $
printFood plate #chicken strips $
printFood plate #fish basket $
printFood plate $shrimp po boy $
printFood plate #pork chop basket $
print
printTell us your name and choose an item from the menu
print
# Prompt customer to enter name
name input Please enter your name:
# Prompt customer to enter the item they would like using the
# menu item number for choice while declaring variable for the item
item int input Which plate number would you like to order?
# Declare variable for tip amount and ask customer if they want to tip
tip inputwould you like to leave a tip for your server
Create statement if they want to tip
if tip :
tipamt intinput How much would you like to tip.
else:
tipamt
# Calculate the default tax in
tax
Calculate the total bill
totalbil
Create statement for each item with tip amount
if item :
totalbil tipamt
elifitem :
totalbil tipamt
elif item :
totalbil tipamt
elif item :
totalbil tipamt
else:
totalbil tipamt
# Display final bill and thank the customer
printYour total is strtotalbil$
printThank you for dining with us today. Please come back and see us again!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
