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 topics541 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
Which hydride breaks the trend? New Chemistry
High School (11–12) · Molecular Orbitals and Hydrogen Bonds

The boiling points of the hydrides of groups 15, 16 and 17 are stored in three lists, from period 2 to period 5. In each group, the hydride of period 2 can form hydrogen bonds. You will find how far it stands above th…

StemPy LabStemPy Lab
Turning points about a centre New Mathematics
High School (11–12) · Complex Numbers

A turn about a centre c through an angle φ sends the point a to c + (a - c)(φ + iφ). You will write it as a function and use it to build a square and an equilateral triangle. Your tasks. In turn, return the image of a…

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
A bond order machine New Chemistry
High School (11–12) · Molecular Orbitals and Hydrogen Bonds

The molecular orbitals of a diatomic molecule are stored in a list, from the lowest energy up, with how many electrons each holds and whether it is bonding. You will write a function that fills them with a given numbe…

StemPy LabStemPy Lab
Principal arguments by hand New Mathematics
High School (11–12) · Complex Numbers

Python's cmath.polar finds the modulus and the principal argument for you. In this lab you build them yourself from math.hypot and math.atan2, and then check your work against cmath. The idea. math.atan2(y, x) looks a…

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
Hybridisation of six central atoms New Chemistry
High School (11–12) · Shapes of Molecules and Hybridisation

Six molecules are stored with the outer electrons of their central atom and the number of singly bonded atoms. You will find the electron pairs on each central atom, its hybridisation, and the molecules that keep a lo…

StemPy LabStemPy Lab
A solver for every quadratic New Mathematics
High School (11–12) · Complex Numbers, Quadratic Equations

Write a quadratic solver that never gives up, and a function for square roots of complex numbers. Use math.sqrt only, so you see where the i comes from. The idea. When D < 0, the roots are -b ± i√(-D)2a. In Python, co…

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
Predicting a shape with VSEPR New Chemistry
High School (11–12) · Shapes of Molecules and Hybridisation

A dictionary links each pair of numbers, electron pairs and lone pairs, to the name of a shape. You will count the pairs on the central atom of sulphur tetrafluoride, find its lone pairs, and look up its shape. The id…

StemPy LabStemPy Lab
Conjugate, modulus and division by hand New Mathematics
High School (11–12) · Complex Numbers

Python can do complex arithmetic for you. Here you write it yourself, with each number kept as two real numbers: a + ib is the pair (a, b). The idea. (a + ib)/(c + id) = ((a + ib)(c - id))/(c^2 + d^2). Expand the top…

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 541