HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClassesGroups

>_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 →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • 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
  • Blog

Account

  • Dashboard
  • My Content
  • Profile
  • Log in
© 2026 senLearn. All rights reserved.HelpAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Python Labs
  2. /Open pool or closed flask
BiologyMediumHigh School (11–12)Cell Biology › Biomolecules

Open pool or closed flask

A pool of molecules gains a supply each minute and loses a share of itself. You will write the rule for one minute, repeat it for many minutes, and compare a cell, which is fed all the time, with a closed flask, which is not.

The idea. A loop can repeat a rule. If the supply goes on, the pool settles where what is used equals what is supplied. If the supply stops, the pool runs down.

Your tasks.

  1. In next_pool, return the pool a minute later: it gains the supply and loses a share of itself.
  2. In run, repeat next_pool for the given number of minutes and return the final pool.
  3. Set steady to the pool that the cell settles at, worked out from the supply and the share.

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, change supply to 80. Where does the cell settle now, and does the flask change?

StemPy LabContributed by StemPy Lab
python
Loading Python runtime…

A 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
More onCell Biology › Biomolecules

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Metabolism and the living stateNucleic Acids, Metabolism and the Living State

More labs on this topic

  1. Pairing the basesEasy
  2. A peptide toolkitMedium
  3. Which pool?Easy
All labs on this topic →

Want to go further?

With Standard, you also open 11 more problems and 2 Python labs. Everything you have used here stays free, always.

Part of our upcoming paid plans.