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 →

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
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Code it

Python Labs

Interactive, runnable Python. Edit the code, run it in your browser, no setup required.

+ Build a Lab
Pick a subject to see its topics1204 labs
Half-life from data New Physics
High School (9–10) · Nuclei and Radioactivity

You will write three functions that use the half-life. The idea. After a time t the amount left is the start amount times 0.5 to the power t/T. A table of readings gives the half-life: take the background away, then f…

StemPy LabStemPy Lab
An ester namer New Chemistry
High School (9–10) · Aldehydes, Ketones and Carboxylic Acids

You will write four functions that name esters and find their masses. One names an unbranched carboxylic acid. One names an ester from the carbon atoms of its acid and alcohol. One finds the relative formula mass of t…

StemPy LabStemPy Lab
Composite and inverse functions New Mathematics
High School (9–10) · Functions and Calculus

Extended. You will build composite functions and inverse functions in Python. Your tasks. In compose, return a new function that applies inner first and then outer. In inverse, return the inverse function of f(x) = ax…

StemPy LabStemPy Lab
Expected mutations New Biology
High School (9–10) · Principles of Inheritance and Variation

You will write three functions: the mutations that a model cell is expected to have, the effect of radiation, and the kinds of zygote from the kinds of gamete. The idea. In a model, each gene has a chance of changing…

StemPy LabStemPy Lab
Fit a noisy sine Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Trigonometry and Waves by Computer

You will fit a sine to 60 noisy readings of a swinging spring, with a first guess from the FFT. The idea. The FFT finds the main frequency to within one bar. curve_fit then refines the amplitude, the frequency and the…

StemPy LabStemPy Lab
A shuffling test New Statistics & Data Science
High School (9–10), High School (11–12), Undergraduate, General · Learning from Samples, Probability and Chance

You will write a shuffling test for two groups and use it on made-up data. The idea. Under the null idea of no difference, the labels mean nothing. Pool the values, shuffle, split them again and record the difference…

StemPy LabStemPy Lab
Decay equations in code New Physics
High School (9–10) · Nuclei and Radioactivity

You will write three functions for decay equations. The idea. Each nucleus is a pair (A, Z). In alpha decay A falls by 4 and Z falls by 2. In beta decay A stays the same and Z rises by 1. Gamma emission changes nothin…

StemPy LabStemPy Lab
A fermentation calculator New Chemistry
High School (9–10) · Alcohols, Phenols and Ethers

You will write four small functions for the calculations of the first lesson. One finds the moles of glucose. One finds the mass of ethanol that is collected. One finds the volume of carbon dioxide. One finds the oxyg…

StemPy LabStemPy Lab
A root by halving the gap New Mathematics
High School (9–10) · Functions and Calculus

You will find a root of x^3 - x - 3 = 0 by looking for a change of sign, and halving the gap again and again. Your tasks. In f, return x^3 - x - 3. In halve, start with low and high, where f(low) is negative and f(hig…

StemPy LabStemPy Lab
Summarise a sample of measurements New Biology
High School (9–10) · Principles of Inheritance and Variation

You will write functions that summarise a list of measurements: the mean, the range, and the number of values in a class. The idea. The mean is the total divided by the number of values. The range is the largest value…

StemPy LabStemPy Lab
A wave and its speed Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Trigonometry and Waves by Computer

You will draw a wave of wavelength 3.0 m and frequency 4.0 Hz at two times, find its first crest each time, and work out its speed. The idea. The crest of y = A(kx - ω t) moves at the speed v = fλ. You find where the…

StemPy LabStemPy Lab
Testing a coin New Statistics & Data Science
High School (9–10), High School (11–12), Undergraduate, General · Learning from Samples, Probability and Chance

You will test a coin both ways: by simulation and by exact counting. The idea. Under the null idea, the coin is fair. The p-value is the chance that a fair coin gives at least as many heads as the real one. Your tasks…

StemPy LabStemPy Lab
Which radiation is it? New Physics
High School (9–10) · Nuclei and Radioactivity

You will write three functions that work out which radiations a source gives out. The idea. Paper stops alpha, a few millimetres of aluminium stop beta, and thick lead reduces gamma. Each absorber removes the radiatio…

StemPy LabStemPy Lab
An addition and yield calculator New Chemistry
High School (9–10) · Alkenes and Alkynes

You will write four functions for the calculations of this course. One finds the relative formula mass of an alkene. One finds the relative formula mass of an addition product. One finds the mass of the product from a…

StemPy LabStemPy Lab
The area under a speed-time graph New Mathematics
High School (9–10) · Functions and Calculus

Extended. You will find the distance and the average speed from a speed-time graph given as a list of points. Your tasks. In distance, return the total area under the graph. For each pair of neighbouring points, add t…

StemPy LabStemPy Lab
Counting chromosome combinations New Biology
High School (9–10) · Cell Cycle and Cell Division

You will write three functions: the kinds of gamete a parent can make, the kinds of zygote two parents can make, and the pairs needed for a given number of kinds. The idea. With n pairs of chromosomes, a parent makes…

StemPy LabStemPy Lab
An identity checker Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Trigonometry and Waves by Computer

You will write three small functions that check a claimed identity on many angles: one finds the worst miss between the two sides, one says whether the identity holds, and one finds an angle where it fails. The idea.…

StemPy LabStemPy Lab
How often do the intervals catch the truth? New Statistics & Data Science
High School (9–10), High School (11–12), Undergraduate, General · Learning from Samples

You will simulate many surveys from a town where the true share is known, and count how often the 95% interval catches it. The idea. Each survey asks n people. Each person says yes when a random number is below the tr…

StemPy LabStemPy Lab
A corrected count rate New Physics
High School (9–10) · Nuclei and Radioactivity

You will write three small functions to deal with the readings of a counter. The idea. The count rate is the counts divided by the time. Readings of a random emission vary, so we average several. The corrected count r…

StemPy LabStemPy Lab
A cracking equation checker New Chemistry
High School (9–10) · Alkenes and Alkynes

You will write four small functions for cracking equations. One finds the atoms that are left over. One says what kind of molecule the left-over atoms make. One checks that an equation is balanced. One counts the ethe…

StemPy LabStemPy Lab
Which rule fits the table? New Mathematics
High School (9–10) · Algebra

Extended. You will test a table against proportion rules in Python and then use the rule that fits. Your tasks. In constants, return the list of y / x power for each pair, each rounded to 4 decimal places. Set power t…

StemPy LabStemPy Lab
Chromosomes down the generations New Biology
High School (9–10) · Cell Cycle and Cell Division

You will write functions for the number of chromosomes in a gamete, in a zygote, and in a body cell after some generations when there is no halving. The idea. A gamete is haploid, so it has half of the diploid number.…

StemPy LabStemPy Lab
An angle toolkit Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Trigonometry and Waves by Computer

You will write three small functions for angles: one that converts degrees to radians without math.radians, one that finds the quadrant of an angle, and one that returns the point of the unit circle at an angle. The i…

StemPy LabStemPy Lab
An interval for a proportion New Statistics & Data Science
High School (9–10), High School (11–12), Undergraduate, General · Learning from Samples

You will write the 95% interval for a proportion, with a check of its conditions. The idea. The estimate is p = countn. The margin is 1.96√(( p(1 - p))/(n)). The formula is trusted only with at least 10 successes and…

StemPy LabStemPy Lab
Balance a nuclear equation New Physics
High School (9–10) · Nuclei and Radioactivity

You will write three functions that check a nuclear equation. The idea. In a nuclear equation the nucleon numbers add up to the same total on both sides. So do the proton numbers. Each particle is written (A, Z). A ne…

StemPy LabStemPy Lab
Page 1 of 49
…

Showing 1–25 of 1204