Computers and Technology
Computers and Technology, 20.04.2021 00:44, judt3500

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)

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 20:10, banna01man
Leo is a recruitment executive for a large company. he has identified new labor resource requirements in both the marketing and production departments. what should be his first step in recruiting candidates for the positions? a. conduct background checks of candidates b. make job offers c. arrange interviews d. conduct reference checks e. place job ads on job sites
Answers: 1
image
Computers and Technology, 24.06.2019 06:00, bzhsh8282
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
image
Computers and Technology, 24.06.2019 12:30, stephanieanaya7
Why does the pc send out a broadcast arp prior
Answers: 1
image
Computers and Technology, 24.06.2019 13:20, sanaiajohnson56
In the insert table dialog box, you select the checkbox to create the first row as the header of the table.
Answers: 3
Do you know the correct answer?
I need to adapt this program so that the user has the ability to order multiple orders using a for l...

Questions in other subjects:

Konu
Mathematics, 17.07.2019 11:00
Konu
Mathematics, 17.07.2019 11:00