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
  • 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 topics529 labs
The entropy of mixing hot and cold water Physics
High School (11–12) · Heat Engines, the Second Law and Entropy

0.80 kg of water at 85 ^ is mixed with different amounts of water at 12 ^, from 0.2 kg to 3.0 kg. You will make the program find the final temperature and the total change of entropy for each amount, and how much cold…

StemPy LabStemPy Lab
Where is the big jump? New Chemistry
High School (11–12) · Periodic Trends

The successive ionisation enthalpies of an element show how many electrons it holds loosely. You will find the ratio of each enthalpy to the one before, the number of valence electrons, and the group of the element. T…

StemPy LabStemPy Lab
How many terms reach a target? New Mathematics
High School (9–10), General · Sequences and Series

You will find how many terms an arithmetic progression needs to reach a target, and recover the terms from a formula for the sum. Your tasks. In terms_to_reach, return the smallest n for which the sum of the first n t…

StemPy LabStemPy Lab
The sex ratio of a district New Biology
High School (9–10), General · Human Reproduction

A health worker has counted the girls and boys under six in five villages. You will write a function for the sex ratio, find it for every village, list the villages below 950, and find the ratio of the whole district.…

StemPy LabStemPy Lab
Where the rise breaks New Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Chemistry by Computer, Data Analysis with pandas

You will find, with pandas alone, the elements of periods 2 and 3 whose first ionisation enthalpy falls below the element before, and the mean of each block. The idea. df.groupby("period")["ie"].diff() gives the chang…

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
Carnot efficiency against the cold temperature Physics
High School (11–12) · Heat Engines, the Second Law and Entropy

An engine's hot reservoir is at 680 K. You will make the program draw the best possible efficiency for cold reservoirs from 250 K to 600 K, and compare a real engine with that limit. The real engine takes in 2300 J an…

StemPy LabStemPy Lab
Ranking the atoms of period 3 by size New Chemistry
High School (11–12) · Periodic Trends

The radii of the period 3 atoms are stored in a dictionary. You will find the largest atom, list the elements from the smallest to the largest, and work out how much the radius falls across the period. The idea. Acros…

StemPy LabStemPy Lab
A sum checked two ways New Mathematics
High School (9–10), General · Sequences and Series

You will write the terms of an arithmetic progression and its sum by the formula, then check that the two agree. Your tasks. In ap_terms, return the list of the first n terms. In ap_sum, return the sum of the first n…

StemPy LabStemPy Lab
A menstrual calendar New Biology
High School (9–10), General · Human Reproduction

Neha keeps a simple calendar of her cycle, counting days from the start of the year. You will write a function for the start of the next period, list her next six periods, and add up the days of bleeding. The idea. A…

StemPy LabStemPy Lab
Filtering the elements New Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Chemistry by Computer, Data Analysis with pandas

You will ask the table of the first 20 elements three questions: which elements are alkali metals, how period 3 lines up by size, and what each ionisation enthalpy is in electron volts. The idea. A filter is df[condit…

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
Net work and efficiency of a cycle Physics
High School (11–12) · Heat Engines, the Second Law and Entropy

A monatomic gas goes clockwise round a rectangle: up at 1.2 L from 1.2 × 10^5 Pa to 3.5 × 10^5 Pa, out to 3.2 L, down, and back. You will make the program find the net work, the heat taken in, and the efficiency of an…

StemPy LabStemPy Lab
Period, group and block from Z New Chemistry
High School (11–12) · Development of the Periodic Table, Groups and Families

You will fill the subshells in the Aufbau order and read where an element sits in the long form, for atomic numbers up to 54. The idea. The period is the highest shell with electrons. The block is the last subshell fi…

StemPy LabStemPy Lab
Terms on demand New Mathematics
High School (9–10), General · Sequences and Series

You will write the formula for the nth term, a function that finds which term a number is, and use them to count. The idea. a_n = a + (n - 1)d. To find which term a number v is, n = (v - a)/(d) + 1, and it must be a w…

StemPy LabStemPy Lab
From flowers to seeds New Biology
High School (9–10), General · Reproduction in Plants

Three crop plants are counted in a school garden: how many flowers each has, how many ovules each ovary holds, and what share of the ovules is fertilised. You will find the seeds of each plant, the plant with the most…

StemPy LabStemPy Lab
A limiting reagent function New Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Chemistry by Computer

Ammonia burns in oxygen in the first step of making nitric acid: 4NH_3 + 5O_2 → 4NO + 6H_2O. You will write a function that takes the moles of the reactants and returns the limiting reagent, the moles of each product…

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
Finding gamma from measured pressures Physics
High School (11–12) · Thermodynamic Processes and Specific Heats of Gases

Air in a pump is squeezed quickly, and its pressure is read at six volumes. You will make the program find γ from the readings, using a straight-line fit, and predict the pressure at 1.0 L. The idea. For an adiabatic…

StemPy LabStemPy Lab
Temporary names for heavy elements New Chemistry
High School (11–12) · Development of the Periodic Table

You will write the two functions that give the temporary IUPAC name and symbol of an element from its atomic number. The idea. Join the roots of the digits and add ium. The i of bi and tri is dropped before ium, and t…

StemPy LabStemPy Lab
Is it an arithmetic progression? New Mathematics
High School (9–10), General · Sequences and Series

You will write a function for the differences of a list, use it to test for an AP, and sort some lists. The idea. A list is an AP when all the differences between neighbouring terms are equal. A list of one or two num…

StemPy LabStemPy Lab
A culture that doubles New Biology
High School (9–10), General · Reproduction in Plants

A single cell is put in fresh food. It divides by binary fission every 30 minutes, and every daughter cell does the same. You will list the number of cells after each hour, find when the culture first has more than 50…

StemPy LabStemPy Lab
A formula reader New Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Chemistry by Computer

You will write the reader at the heart of a molar mass calculator. It turns a formula string into a dictionary of symbols and counts, then a second function opens one bracket. The idea. re.findall(r"([A-Z][a-z]?)(\d*)…

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
Isothermal and adiabatic expansion compared Physics
High School (11–12) · Thermodynamic Processes and Specific Heats of Gases

A gas at 2.2 × 10^5 Pa expands from 1.5 L to 6.0 L, once at a steady temperature and once adiabatically (γ = 1.40). You will make the program draw both curves and find the work of each from the area under it. The idea…

StemPy LabStemPy Lab
Page 1 of 22
…

Showing 1–25 of 529