Computers and Technology

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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:30, 710jonathan
The following is an excerpt from a slide presentation. today we will inverse operations solving equations using inverse operations solving inequalities using inverse operations from which part of the presentation does the slide most likely come from? a. introduction b. outline c. body d. conclusion
Answers: 1
image
Computers and Technology, 24.06.2019 13:20, ana9340
3. ranga ramasesh is the operations manager for a firm that is trying to decide which one of four countries it should research for possible outsourcing providers. the first step is to select a country based on cultural risk factors, which are critical to eventual business success with the provider. ranga has reviewed outsourcing provider directories and found that the four countries in the table that follows have an ample number of providers from which they can choose. to aid in the country selection step, he has enlisted the aid of a cultural expert, john wang, who has provided ratings of the various criteria in the table. the resulting ratings are on a 1 to 10 scale, where 1 is a low risk and 10 is a high risk. john has also determined six criteria weightins: trust, with a weight of 0.3; quality, with 0.2; religious, with 0.1; individualism, with 0.2; time, with 0.1; and uncertainity, with 0.1. using the factor-rating method, which country should ranga select? why? (2 points)
Answers: 3
image
Computers and Technology, 24.06.2019 16:30, laureanogabriel
What is the item which could be matched with a statement below? software installed on a computer that produces pop-up ads using your browser an example of social engineering malware loads itself before the os boot is complete type of spyware that tracks your keystrokes, including passwords windows key + l the practice of tricking people into giving out private information or allowing unsafe programs into the network or computer when someone who is unauthorized follows the employee through a secured entrance to a room or building a type of malware that tricks you into opening it by substituting itself for a legitimate program a computer that has been hacked, and the hacker is using the computer to run repetitive software in the background without the user's knowledge an infestation designed to copy itself repeatedly to memory, on drive space, or on a network
Answers: 1
image
Computers and Technology, 24.06.2019 19:30, luckye
Can someone who is skilled at coding create me a java chess game. don't copy from online source codes. make it original ! : d
Answers: 1
Do you know the correct 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, 17.11.2019 01:31
Konu
Physics, 17.11.2019 01:31