Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write this code in python, espiecally step 5 Imagine you run a small bakery and provide cookies for various events. Recently, you received orders for

Write this code in python, espiecally step 5
Imagine you run a small bakery and provide cookies for various events. Recently, you received orders for five different events. Note: each requiring cookies of different flavors, prepared separately.
1) Write code that asks the user t`he number of cookies needed for each event.
2) The average cost to produce each cookie is $0.50, and you sell them for $1.20 each. Display the total profit earned from five events. Round the answer to two decimal places.
3) The recipe you use yields 24 cookies per batch. Ensure you bake enough cookies to fulfill each order. Determine and display the number of batches needed for each event. For example, an order for 65 cookies requires 3 batches (72 cookies). While an order for 240 cookies needs 11 batches (preparing additional batches as a precaution)
4) Cookies are ready to pack for delivery now! Cookie boxes hold 8 cookies each, and any remaining cookies are packed in individual bags for individual sale. Determine the number of boxes and bags used for cookies ordered in each of the 5 events. For example, an order for 65 cookies would use 8 boxes and 1 bag. 5) Good news! There is no damage during transportation! You can sell the extra cookies in your bakery at a special price of $0.99 each. Calculate the total profit for all five events, including these additional sales. Round the answer to two decimal places.
The output should be exatly like this:
How many cookies for event. 1?65
How many cookies for event 2?240
How many cookies for event 3?115
How many cookies for event 4?80
How many cookies for event 5?100
The profit is 420.0 dollars.
Event 1 needs 3 batches in total.
Event 2 needs 11 batches in total.
Event 3 needs 5 batches in total.
Event 4 needs 4 batches in total.
Event 5 needs 5 batches in total.
Event 1 needs 8 boxes and 3 bags.
Event 2 needs 30 boxes and 0 bags.
Event 3 needs 14 boxes and 3 bags.
Event 4 needs 10 boxes and 0 bags.
Event 5 needs 12 boxes and 4 bags.
The total profit is 455.28 dollars.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions