Question: Write a python program to simulates the financial status of a small bakery business. This program will determine how profitable the business is each week.

 Write a python program to simulates the financial status of a

small bakery business. This program will determine how profitable the business is

each week. It should allow the user to run this simulation for

Write a python program to simulates the financial status of a small bakery business. This program will determine how profitable the business is each week. It should allow the user to run this simulation for as many times as they desired. It can be simulated using (pseudo) random numbers. (Attached screenshot of your code and output) The bakery mainly focuses on selling cake and the amount of sales are random chance such as holidays, special occasions, etc. Each year it will result in one of the following outcomes: Outcome 1: 5% chance, good sales = the bakery earns $300,000 Outcome 2: 75% chance, decent sales = the bakery earns $100,000 Outcome 3: 20% chance, poor sales = the bakery loses $20,000 Instead of just selling only cake, the bakery switched it up by rotating between macaron and cake. The bakery will focus on cake for two weeks, then macaron on the third week then return back to cake. The amount of sales depends on random chance such as holidays, special occasions, etc. In the week the bakery selling macaron, it will result in one of the following outcomes Outcome 1: 60% chance, good sales = the bakery earns $80,000 Outcome 2: 40% chance, poor sales = the bakery loses $10,000 The program simulates the profit or loss each week and also track the total profit of the total amount of profit or loss since week 1 of the simulation. Print summary of each week in the following format. ** Week # ** Menu this week: [Cake or macaron] This week's profit or loss: $# Total profit or loss: $# The simulation will stop if one or more of the conditions is met. It's possible for more than one of the conditions to be met in the same week. - The total profit is negative at the end. The bakery will close down. - There are five consecutive weeks of positive profit. The bakery will continue its business. - The total profit reaches at least $560,000. The bakery will continue its business. The output should show something of similar like the following example: ** Week 1 ** Menu this week: Cake This week's profit or loss: $300,000 Total profit or loss: $300,000 ** Week 2 ** Menu this week: Cake This week's profit or loss: $100,000 Total profit or loss: $400,000 ** Week 3 ** Menu this week: Macaron This week's profit or loss: $-10,000 Total profit or loss: $390,000 ** Week 4 ** Menu this week: Cake This week's profit or loss: $100,000 Total profit or loss: $490,000 ** Week 5 ** Menu this week: Cake This week's profit or loss: $100,000 Total profit or loss: $590,000 The total profit reaches at least $560,000. The bakery will continue its business. Do you want to run the simulation again? Yes ** Week 1 ** Menu this week: Cake This week's profit or loss: $100,000 Total profit or loss: $100,000 ** Week 2 ** Menu this week: Cake This week's profit or loss: $-20,000 Total profit or loss: $80,000 ** Week 3 ** Menu this week: Macaron This week's profit or loss: $-10,000 Total profit or loss: $70,000 ** Week 4 ** Menu this week: Cakel This week's profit or loss: $100,000 Total profit or loss: $170,000 ** Week 5 ** Menu this week: Cake This week's profit or loss: $100,000 Total profit or loss: $270,000 ** Week 6 ** Menu this week: Macaron This week's profit or loss: $80,000 Total profit or loss: $350,000 ** Week 7 ** Menu this week: Cake This week's profit or loss: $100,000 Total profit or loss: $450,000 ** Week 8 ** Menu this week: Macaron This week's profit or loss: $80,000 Total profit or loss: $550,000 There are five consecutive weeks of positive profit. The bakery will continue its business. The total profit reaches at least $560,000. The bakery will continue its business. Do you want to run the simulation again? No

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!