4. Functions and Algebra with Python
Activity 4.01: Multi-Variable Break-Even Analysis
Solution:
- Let x be the number of burgers that the restaurant produces each month and y be the price of each burger. Then, the monthly revenue will be xy, the cost will be 6.56x + 1312.13, and finally, the total profit will be the difference between the two: xy - 6.56x - 1312.13.
- To break even, the number of burgers produced, x, must be equal to the demand, which gives us the equation: x = 4000/y. Furthermore, the total profit should be zero, which leads to xy - 6.56x = 1312.13.
Overall, we have the following system of equations:
- From the first equation, we can solve for x = 409.73628. Plugging this into the second equation, we can solve for y = 9.76237691.
To solve this system in Python, we first declare our variables and constants:
COST_PER_BURGER = 6.56 FIXED_COST = 1312.13 AVG_TOWN_BUDGET = 4000 x = Symbol('x') # number of burgers to be...