subject

Please help with this I attached a pic of what I have tried to come up with. I'll give more point !! You have been asked to write a program that calculates the total price for a picnic lunch that the user is purchasing for a group of friends. Your program should:
• Ask the user to enter her budget for the lunch • The user has the option of buying apples, cheese, and bread.
• Set the price per apple, price per pound of cheese, and price per loaf of bread as constant variables.
• Use a nested repetition/selection structure to ask the user what type of item and how much of each item he/she would like to purchase. Keep a running total of the items purchased inside the loop.
• Exit the loop if the total has exceeded the user's budget. Additionally, provide a sentinel value that allows the user to exit the purchasing loop at any time. • After the loop is exited, display the total amount spent, the total amount of each item purchased (quantity and cost) and the amount of the budget that remains. .
Be sure to include appropriate documentation at the start of the program and within the program.
You will submit your .py file for this part of the test as a response to this question.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:30, arguellesjavier15
Who can provide you with a new password when you have forgotten your old one? your provide you with a new password in case you forget your old one.
Answers: 3
image
Computers and Technology, 23.06.2019 10:00, thezbell
What is estimated time of arrival (eta)? a device that measures the acceleration (the rate of change of velocity) of an item and is used to track truck speeds or taxi cab speeds a gps technology adventure game that posts the longitude and latitude location for an item on the internet for users to find a north/south measurement of position the time of day of an expected arrival at a certain destination and is typically used for navigation applications
Answers: 3
image
Computers and Technology, 24.06.2019 01:30, BIKRAMlawati5544
Could you find out how im still getting an 83 percent on this in edhesive a = input("enter an animal: ") s = input ("enter a sound: ") e = "e-i-e-i-o" print ("old macdonald had a farm, " + e) print ("and on his farm he had a " + a + "," + e) print ("with a " + s + "-" + s + " here and a " + s + "-" + s + " there") print ("here a " + s+ " there a " + s) print ("everywhere a " + s + "-" + s ) print ("old macdonald had a farm, " + e)
Answers: 2
image
Computers and Technology, 25.06.2019 00:00, tori3981
When pasting an existing chart into a word document, you can choose to using the paste options button. a. paste the chart as a picture b. embed the chart c. add the chart while keeping the destination formatting intact d. insert the chart while keeping the source formatting intact
Answers: 1
You know the right answer?
Please help with this I attached a pic of what I have tried to come up with. I'll give more point !!...

Questions in other subjects:

Konu
Mathematics, 05.02.2021 23:10