subject

I need to adapt this program so that the user has the ability to order multiple orders using a for loop or while loop, I will give brainliest to anybody with a good answer or help with this! (This is Python, You can use Trinket. io to edit the code)

Fries_Bought = False
Sandwhich_Bought = False
Beverage_Bought = False
Total_Cost = 0
order = []
Discounts = "You didn't get any discounts :("
print ("Combo Menu")
print ("Item 1: chicken $5.25")
print ("Item 2: beef $6.25")
print ("Item 3: tofu $5.75")
Sandwhich = input("Which Sandwhich Would You Like? Insert Meat Name:")
if Sandwhich == "Chicken":
order. append("Chicken")
Total_Cost = Total_Cost + 5.25
Sandwhich_Bought = True
if Sandwhich == "Beef":
order. append("Beef")
Total_Cost = Total_Cost + 6.25
Sandwhich_Bought = True
if Sandwhich == "Tofu":
order. append("Tofu")
Sandwhich_Bought = True
Total_Cost = Total_Cost + 5.75
Beverage = input("Would you like a beverage? (Small, Medium, Large, or none)")
if Beverage == "Small":
Total_Cost = Total_Cost + 1
Beverage_Bought = True
order. append("Small Beverage")
if Beverage == "Medium":
Total_Cost = Total_Cost + 1.75
Beverage_Bought = True
order. append("Medium Beverage")
if Beverage == "Large":
Total_Cost = Total_Cost + 2.25
Beverage_Bought = True
order. append("Large Beverage")
Fries = input("What size of fries would you like? (Small, Medium, Large, None)")
if Fries== "Small":
Mega = input("Would you like to mega size?")
if Mega == "Yes":
Total_Cost = Total_Cost + 2
Fries_Bought = True
order. append("Mega Fries")
if Mega == "No":
Total_Cost = Total_Cost + 1
Fries_Bought = True
order. append("Small Fries")
if Fries == "Medium":
Total_Cost = Total_Cost + 1.5
Fries_Bought = True
order. append("Medium Fries")
if Fries == "Large":
Total_Cost = Total_Cost + 2
Fries_Bought = True
order. append("Mega Fries")
if Fries == "None":
Total_Cost = Total_Cost + 0
Ketchup = input("How Many Ketchup Packets do you want? (Up to 25 Ketchup Packets)")
if Ketchup == "1":
Total_Cost = Total_Cost + 0.25
order. append("1 Ketchup")
if Ketchup == "2":
Total_Cost = Total_Cost + 0.50
order. append("2 Ketchup")
if Ketchup == "3":
Total_Cost = Total_Cost + 0.75
order. append("3 Ketchup")
if Ketchup == "4":
Total_Cost = Total_Cost + 1
order. append("4 Ketchup")
if Ketchup == "5":
Total_Cost = Total_Cost + 1.25
order. append("5 Ketchup")
if Ketchup == "6":
Total_Cost = Total_Cost + 1.5
order. append("6 Ketchup")
if Ketchup == "7":
Total_Cost = Total_Cost + 1.75
order. append("7 Ketchup")
if Ketchup == "8":
Total_Cost = Total_Cost + 2
order. append("8 Ketchup")
if Ketchup == "9":
Total_Cost = Total_Cost + 2.25
order. append("9 Ketchup")
if Ketchup == "10":
Total_Cost = Total_Cost + 2.5
order. append("10 Ketchup")
if Ketchup == "11":
Total_Cost = Total_Cost + 2.75
order. append("11 Ketchup")
if Ketchup == "12":
Total_Cost = Total_Cost + 3
order. append("12 Ketchup")
if Ketchup == "13":
Total_Cost = Total_Cost + 3.25
order. append("13 Ketchup")
if Ketchup == "14":
Total_Cost = Total_Cost + 3.5
order. append("14 Ketchup")
if Ketchup == "15":
Total_Cost = Total_Cost + 3.75
order. append("15 Ketchup")
if Ketchup == "16":
Total_Cost = Total_Cost + 4
vorder. append("16 Ketchup")
if Ketchup == "17":
Total_Cost = Total_Cost + 4.25
order. append("17 Ketchup")
if Ketchup == "18":
Total_Cost = Total_Cost + 4.5
order. append("18 Ketchup")
if Ketchup == "19":
Total_Cost = Total_Cost + 4.75
order. append("19 Ketchup")
if Ketchup == "20":
Total_Cost = Total_Cost + 5
order. append("20 Ketchup")
if Ketchup == "21":
Total_Cost = Total_Cost + 5.25
order. append("21 Ketchup")
if Ketchup == "22":
Total_Cost = Total_Cost + 5.5
order. append("22 Ketchup")
if Ketchup == "23":
Total_Cost = Total_Cost + 5.75
order. append("23 Ketchup")
if Ketchup == "24":
Total_Cost = Total_Cost + 6
order. append("24 Ketchup")
if Ketchup == "25":
Total_Cost = Total_Cost + 6.25
order. append("25 Ketchup")
if Sandwhich_Bought == False:
order. append("No Sandwhich Bought")
if Beverage_Bought == False:
order. append("No Beverage Bought")
if Fries_Bought == False:
order. append("No Fries Bought")
if Sandwhich_Bought == True:
if Beverage_Bought == True:
if Fries_Bought == True:
Total_Cost = Total_Cost - 1
Discounts = "You got 1.00 off your order!"
print ("You have chosen for your meal:")
print (Sandwhich)
print ("You have chosen for your Beverage:")
print (Beverage)
print ("You have chosen for your Fries:")
print (Fries)
print ("You have chosen for your Ketchup Packets:")
print (Ketchup)
print (Discounts)
print ("Your total is:")
print (Total_Cost)
print (order)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 18:30
Where can page numbers appear? check all that apply. in the header inside tables in the footer at the bottom of columns at the top of columns
Answers: 1
question
Computers and Technology, 23.06.2019 18:50
Ais a picture icon that is a direct link to a file or folder
Answers: 1
question
Computers and Technology, 24.06.2019 10:10
Scanning the road can be thought of as a
Answers: 2
question
Computers and Technology, 24.06.2019 10:20
Multiple choice project create a program with two multiple choice questions. 1. users have two attempts only, show attempt number each time. hint: while loop with break control. (20%) 2. only one correct answer for each question, use switch case for each question. (20%) 3. show total score after the two questions are answered. hint: . (20%) 4. user have options to answer the two questions again if first attempt score is not 100%. hint: if statment. (20%) 5. use string method .toupper() to allow users to enter with lowercase or uppercase letters. (20%) 1. where is the capital of the state of florida? a. orlando b. tallahassee c. miami d. tampa b 2. where is walt disney world park located in florida? a. orlando b. tallahassee c. miami d. tampa a
Answers: 1
You know the right answer?
I need to adapt this program so that the user has the ability to order multiple orders using a for l...
Questions
question
History, 20.03.2021 01:20
Questions on the website: 13722360