You will write functions for the balance of the Fischer esterification. They give the fraction of the acid that becomes ester, the mass of ester, and the least amount of alcohol for a target yield.
The idea. Start with 1 mol of acid and mol of alcohol. At balance . This is the quadratic , and the root below 1 is the one we want.
Your tasks.
ester_fraction(r, K).ester_mass(acid_mol, r, K, molar_mass).least_alcohol(target, K) so that it returns the smallest whole number of moles of alcohol that gives at least the target fraction.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…