Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python programming 2. (20 points) You own a very popular bakery that always sells everything they make. One morning you wake up with a brilliant
python programming
2. (20 points) You own a very popular bakery that always sells everything they make. One morning you wake up with a brilliant idea. You check how much yeast, flour, and sugar you have (you know you have a sufficient amount of all other ingredients) and try to maximize your profits for the day. For each type of pastry, you know how much you can sell it for, and how much yeast, flour, and sugar producing it requires. What is the maximum profit you can generate and how much of each type of pastry should you make? (a) Read currently available amounts of ingredients from ingredients.csv (you should create that file). The file should have the following format, with only the numbers being possibly different: Yeast,Flour,Sugar 57.5,112.5,245 You can assume that all the numbers are non-negative. (b) Read the list of goods the bakery can produce from pastries.csv (you should create this file as well). Each item on the list has a name and price and also requires a certain amount of yeast, flour, and sugar to make. The file should have the following format, which should be easy to understand: Name,Price, Yeast, Flour,Sugar "Apple Pie",2.99,0,0.75,1.50 Croissant, 2.50,0.5,1.5,0.25 "Poppy seed roll",5.99,1.15,1.5,0.75 You can assume that all numbers are non-negative and all prices are strictly positive. (c) Find the best solution, given your circumstances. Output the total profit and how much of each pastry you have to make. A sample possible output for the input above is The max profit is 449.00 and can be achieved by producing * Apple Pie: 50.00 pieces * Poppy seed roll: 50.00 pieces Note 1: Describe at least briefly how you find your solution, especially if the code is not straight forward. Note 2: If the best solution you can find requires making fractions of some pastries, leave it this way and do not try to fix thisStep 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