Answered step by step
Verified Expert Solution
Question
1 Approved Answer
simple python please Next, you are starting your very own donut shop that sells glazed, chocolate, and sprinkled donuts. Each time you run your program
simple python please
Next, you are starting your very own donut shop that sells glazed, chocolate, and sprinkled donuts. Each time you run your program represents one customer entering your donut shop. Each customer may buy as many donuts as they want, but they can only buy one kind of donut. Your program should: Ask the user what kind of donut they'd like. Ask the user how many donuts they'd like. Tell the user how much their donuts cost. Report how much profit your donut shop made from this sale. We'll give you the starting files, which contain the sale price (on the first line) and the ingredient cost (on the second line) of each kind of donut. glazed.txt 1.5 1.0 chocolate.txt 2.0 1.25 sprinkled.txt 2.25 1.30 For example, the shop sells glazed donuts for $1.50 and the ingredients cost $1.00, so each glazed donut sold makes a profit of $0.50. Example (user input is in bold underlined): What kind of donut would you like [glazed, chocolate, sprinkled]? glazed How many donuts would you like? Z Please pay: $10.5 This sale made us $3.51 Enjoy your donuts! The next time the program is run, the customer might ask for chocolate donuts: What kind of donut would you like [glazed, chocolate, sprinkled]? chocolate How many donuts would you like? 2 Please pay: $4.0 This sale made us $1.5! Enjoy your donuts! The next time the program is run, the customer might ask for sprinkled donuts: What kind of donut would you like [glazed, chocolate, sprinkled]? sprinkled How many donuts would you like? 23 Please pay: $51.75 This sale made us $21.851 Enjoy your donuts!
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