Baking with sympy
Problem: a recipe calls for 250ml double cream (48% fat) and 100ml whole milk (3.5% fat). I only have double cream (48% fat) and semi-skimmed milk (1.5% fat).
How much do I adjust the double cream by to get the same quantity liquid and fat content?
It’s a simple simultaneous equation, so solving it with Sympy is overkill, but developers do overkill best, right?
So:
>>> linsolve([Eq(x + y, 350), Eq(x*.
[Read More]