You will write the arithmetic of polymer chains: the mass of a repeat unit from its formula, the degree of polymerisation, and the Carothers equation.
The idea. The repeat unit of an addition polymer has the formula of its monomer. A chain of molar mass holds repeat units. In a step-growth polymer, residues.
Your tasks.
repeat_mass(formula) with the helper parse.degree(mn, formula): the number of repeat units in a chain.carothers(p).Run your code once to unlock the worked solution.
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…