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
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 topics668 labs
A bridge and a potentiometer in code New Physics
High School (11–12) · Current Electricity

You will write three functions for the measuring circuits of this course. The idea. A meter bridge balances when (X)/(R) = (l)/(100 - l). A potentiometer compares emfs by their balance lengths. A cell with a resistor…

StemPy LabStemPy Lab
Will the metal dissolve? New Chemistry
High School (11–12) · Redox Reactions

You will write functions that predict whether a metal dissolves in a solution of another metal's ions. You will also pick out the metals that release hydrogen from acid, and work out the free energy change of a reacti…

StemPy LabStemPy Lab
Binomial sums and series in code New Mathematics
High School (11–12) · Algebra

Two ideas of this lesson are easy to test in code: the sum of r ^nC_r, and the coefficient of x^k in (1 + x)^α for an index α that is not a whole number. A falling product replaces the factorial. Your tasks. In weight…

StemPy LabStemPy Lab
A small farm's accounts New Biology
High School (9–10) · Biology in Human Welfare

A family runs a small farm with cattle, poultry, fish and bees. You will find the profit of each part. Then you will find the part that earns the most and the profit of the whole farm. The idea. For each part of the f…

StemPy LabStemPy Lab
Fit a noisy sine New 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
The summary machine Statistics & Data Science
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Averages: Mean, Median and Mode, Spread of Data, Probability and Chance

You will build a function that summarises any list of numbers: how many, the mean, the median, the range and a chance. Then it summarises the month, and the definition of a hot day is yours to choose. The idea. A summ…

StemPy LabStemPy Lab
Arrangements of cells New Physics
High School (11–12) · Current Electricity

You will write three functions that describe a group of cells, and then find the best arrangement. The idea. N identical cells are joined in m rows of k cells, with N = mk. The group has emf kE and internal resistance…

StemPy LabStemPy Lab
Cell potentials from a table New Chemistry
High School (11–12) · Redox Reactions

You will write functions that work with a table of standard potentials. One finds the cell potential of two half-cells. One says whether a cell works. You will also find the best pair of electrodes in the table. The i…

StemPy LabStemPy Lab
The greatest term, tried and ruled New Mathematics
High School (11–12) · Algebra

The ratio rule is quick, but a computer can check it against every term. In this lab you find the greatest terms of (a + b)^n by trying every term, then by the rule, and then you test for a tie. Your tasks. In by_tryi…

StemPy LabStemPy Lab
Milk from the herd New Biology
High School (9–10) · Biology in Human Welfare

A dairy keeps four cows. You will write a function for the milk in one lactation. Then you will find the milk of each cow and the cow that gives the most. Last, you will work out the income from the whole herd. The id…

StemPy LabStemPy Lab
A wave and its speed New 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
Graph the month Statistics & Data Science
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Averages: Mean, Median and Mode, Spread of Data, Probability and Chance

The month of 30 days is in two lists: the temperatures and the rainy days. You will split the temperatures into rainy and dry days, and count how many days had each temperature. Then the program draws a line graph wit…

StemPy LabStemPy Lab
Wires, temperature and the colour code New Physics
High School (11–12) · Current Electricity

You will write three functions that a designer of resistors might use. The idea. A round wire has R = ρ L/A with A = π d^2/4. A metal has R = R_0[1 + α(T - T_0)]. A carbon resistor shows two digits, a power of ten and…

StemPy LabStemPy Lab
From a titre to a concentration New Chemistry
High School (11–12) · Redox Reactions

A flask holds iron(II) solution. You will turn the titre of permanganate into moles, then into the concentration of iron(II), and check the answer with equivalents. The idea. Moles are concentration times volume in li…

StemPy LabStemPy Lab
Remainders and short sums New Mathematics
High School (11–12) · Algebra

Write tools that expand a power term by term, find a remainder from two terms, and add the first terms of (1 + h)^n. The idea. The terms of (a + b)^n are ^nC_k a^n - k b^k. Modulo d^2, (d + 1)^n behaves like 1 + nd. F…

StemPy LabStemPy Lab
Grain lost in a store New Biology
High School (9–10) · Biology in Human Welfare

A store holds 100 tonnes of grain. An untreated store loses 8\% of the grain that is left each month. A store that is cleaned, dried and fumigated loses 1\% each month. You will follow the untreated store for six mont…

StemPy LabStemPy Lab
An identity checker New 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
Two dice: simulation against exact Statistics & Data Science
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Probability and Chance

You will find the exact probability of each sum of two dice by listing the 36 pairs, then roll two dice 3,600 times and compare. The program draws both side by side. The idea. The exact probability counts equally like…

StemPy LabStemPy Lab
Electrons and drift in code New Physics
High School (11–12) · Current Electricity

You will write three small functions about the current in a copper wire. They use I = nAev_d. The idea. One electron has a charge of 1.6 × 10^-19 C. Copper has 8.5 × 10^28 free electrons in each cubic metre. Areas are…

StemPy LabStemPy Lab
Make the electrons match New Chemistry
High School (11–12) · Redox Reactions

Chlorate ions oxidise iron(II) ions in acid. You will use the electrons gained and lost to find how many ions react, and then the number of H^+ ions the equation needs. The idea. One chlorine atom goes from +5 in chlo…

StemPy LabStemPy Lab
Rows and their sums in code New Mathematics
High School (11–12) · Algebra

Build rows of Pascal's triangle in two different ways, and use them to check the sums of the coefficients. The idea. Each coefficient is the one before it times (n - r + 1)/(r). The next row comes from adding neighbou…

StemPy LabStemPy Lab
Crops of two seasons New Biology
High School (9–10) · Biology in Human Welfare

Farmers in India sow kharif crops with the rains and rabi crops in winter. A list gives the season of each crop. You will sort the crops by season and find the share of kharif crops. The idea. Go through the crops, an…

StemPy LabStemPy Lab
An angle toolkit New 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
The long run of a coin Statistics & Data Science
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Probability and Chance

You will toss a coin 500 times in a program, keep the share of heads after every toss, and draw how that share moves. Then you see how close the last share comes to 0.5. The idea. The share of heads jumps about in a s…

StemPy LabStemPy Lab
Spectra of one-electron atoms New Physics
High School (11–12) · Atoms and Atomic Spectra

You will find the energy levels and the spectral lines of any atom or ion that has one electron. The idea. The level n has energy E_n = -(13.6 Z^2)/(n^2) eV. A jump gives a photon with the difference of two levels, an…

StemPy LabStemPy Lab
Page 1 of 27
…

Showing 1–25 of 668