Question
Hello, this code needs to be written in PYTHON: I ALREADY HAVE A CODE ATTACHED BELOW!! just needs to be updated. SOME PARTS OF THIS
Hello, this code needs to be written in PYTHON: I ALREADY HAVE A CODE ATTACHED BELOW!! just needs to be updated. SOME PARTS OF THIS CODE ALREADY ATTACHED MIGHT NOT WORK!
_________________________________________________________________________________________________________
This code is missing a few things.. this code still needs:
_________________________________________________________________________________________________________
- To be able to let the user input a size for their meal (Choices must be between S or M) for single or meal (IF the customer picks any letters besides S or M they should be prompted to re-enter between those two choices.....
- Needs to prompt which customer is picking (for example if you input two customers it needs to to say: "CUSTOMER ONE PICK: ....." then it should tell customer 2 when to stat picking too.) And so on depending on the inout of people above....
-After the customer picks their food options, the total of the persons food INDIVIDUALLY for EACH customer... total should be printed at the end of EACH customers order, depending on what they chose.
-After the total for the first customer is output, prompt for the next customer, and after they input/pick their choice the code must also print their food total.
- After each customer has chosen their order, the code needs to add up everyones ordering print it...
_________________________________________________________________________________________________________
EXAMPLE OF THIS PROGRAM:-
How many people will place orders?- 2
(Must be between 1-25 people in the party placing orders)
_________________________________________________________________________________________________________
Item SINGLE Meal
Buffalo Nuggets 3.50 5.00
Parmesan Nuggets 3.25 4.75
Barbeque Nuggets 3.00 4.50
Chili Cheese Nuggets 4.50 6.00
_________________________________________________________________________________________________________
CUSTOMER 1
Enter number:
1 - Buffalo
2 - Parmesan
3 - Barbeque
4 - Chili-Cheese
5 (their choice)
prompt them to re-enter correct number....
_________________________________________________________________________________________________________
choose your size: Single or Meal (S or M) - S (they chose single)
Single BarbequeCost was 3.0 (output cost for each customer)
_________________________________________________________________________________________________________
Item SINGLE Meal
Buffalo Nuggets 3.50 5.00
Parmesan Nuggets 3.25 4.75
Barbeque Nuggets 3.00 4.50
Chili Cheese Nuggets 4.50 6.00
_________________________________________________________________________________________________________
Customer 2
Enter number for your choice of meat
1 - Buffalo
2 - Parmesan
3 - Barbeque
4 - Chili-Cheese
1
_________________________________________________________________________________________________________
Single or Meal (S or M) D
Must be between S or M
Please reenterM
_________________________________________________________________________________________________________
Buffalo MealCost was 5.0
Total Amount Dur for 2 orders is 8.0
_________________________________________________________________________________________________________
This is the code so far: Just those things listed above need to be added in and tested to make sure output Is correct.. thank you-
_________________________________________________________________________________________________________
print('Enter number of people: ') valid = True while(valid): n=int(input()) if(n<1 or n>25): print('Must be between 1-25..') print('Please re-enter valid number of people:') else: valid = False menu = {1:5.00,2:4.75,3:4.50,4:6.00} flavors = {1:'Buffalo Nuggets',2:'Parmesan Nuggets',3:'Barbeque Nuggets',4:'Chili Cheese Nuggets'} total = 0 for i in range(n): print(' MENU:') print() print(' ITEM SINGLE MEAL') print('1-Buffalo Nuggets 3.50 5.00') print('2-Parmesan Nuggets 3.25 4.75') print('3-Barbeque Nuggets 3.00 4.50') print('4-Chili Cheese Nuggets 4.50 6.00') print() a = 1 print('Enter number for your choice of flavor meat') print('1 - Buffalo') print('2 - Parmesan') print('3 - Barbeque') print('4 - Chili-Cheese') flavor=int(input()) if(flavor<1 or flavor>4): print('Must be between choices 1, 2, 3, or 4.') print('Please re-enter:') flavor=int(input()) S=0 M=0
print('Please enter a size') print('Single or Meal? (S or M):') size = input() if(1 and S): print("3.50") if(1 and M): print("5.00") print('Your order is:'+flavors[flavor]+', size is:'+str(size)+', cost is: '+str(menu[flavor]*size)) total+=menu[flavor]*size print('Total order Cost is:'+str(total)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started