HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Python Labs
  2. /Repeat units and chain length
ChemistryMediumHigh School (11–12)Organic Synthesis and Reaction Pathways

Repeat units and chain length

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 MnM_nMn​ holds Mn/MrepeatM_n / M_{\text{repeat}}Mn​/Mrepeat​ repeat units. In a step-growth polymer, Xn=1/(1−p)X_n = 1/(1 - p)Xn​=1/(1−p) residues.

Your tasks.

  1. Complete repeat_mass(formula) with the helper parse.
  2. Complete degree(mn, formula): the number of repeat units in a chain.
  3. Complete carothers(p).

Run it first, just as it is. The checker at the end prints FAIL for each task. Then do the tasks one at a time, and run the program again after each one. A Hint appears under every check that still fails.

When every line says PASS, find the degree of polymerisation of polystyrene, C8H8\text{C}_{8}\text{H}_{8}C8​H8​, with Mn=312 000M_n = 312\,000Mn​=312000 g/mol.

StemPy LabContributed by StemPy Lab
python
Loading Python runtime…

A worked solution

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 save
← All Labs
← Enantiomeric excess from a polarimeterEnergy of the light in a flame →
More onOrganic Synthesis and Reaction Pathways

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Polymerisation as a synthetic step: monomers, repeat units and chain lengthChirality and Polymers in Synthesis

More labs on this topic

  1. Enantiomeric excess from a polarimeterEasy
  2. Clues from a formulaMedium
  3. Overall yield of linear and convergent routesEasy
  4. Finding a route on the reaction mapMedium
  • Molar mass and yield from a formulaEasy
  • All labs on this topic →