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 topics569 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
From delta G standard to K and back New Chemistry
High School (11–12) · Entropy, Gibbs Energy and Spontaneity

You will write two functions that turn a standard Gibbs energy change into an equilibrium constant and back again, and use them on a short list of reactions at 298 K. The idea. K = -Δ G^° / (2.303 RT), with Δ G^° in J…

StemPy LabStemPy Lab
Committees with conditions New Mathematics
High School (11–12) · Permutations and Combinations

Count committees with rules, by formula, and let the checker compare your answers with a full listing. The idea. For a committee of r from m men and w women, exactly k women can be chosen in ^wC_k × ^mC_r - k ways. At…

StemPy LabStemPy Lab
Hearts and body heat New Biology
High School (11–12) · Chordates and Vertebrates

Six vertebrates are listed with the atria and ventricles of their hearts, and whether they keep a steady body temperature. You will count the chambers of each heart, find the four-chambered hearts, and list the warm-b…

StemPy LabStemPy Lab
Simulating many crosses New Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Biology by Computer, Simulation and Randomness

You will simulate 4000 children of Pp with Pp and check that about one in four has white flowers. The idea. random.choice picks one letter from a parent. One letter from each parent, sorted, makes a child. A fixed see…

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
Will it go? A delta G calculator New Chemistry
High School (11–12) · Entropy, Gibbs Energy and Spontaneity

Four reactions are stored with their Δ H in kJ/mol and Δ S in J/(K mol). You will write a function for Δ G, use it to find which reactions are spontaneous at a given temperature, and find where one of them turns spont…

StemPy LabStemPy Lab
nCr three ways New Mathematics
High School (11–12) · Permutations and Combinations

Work out ^nC_r yourself in three ways, and check that they agree with Python's math.comb. The idea. The formula is (n!)/(r! (n - r)!). It is quicker to multiply r fractions: (n)/(1) × (n - 1)/(2) × × (n - r + 1)/(r).…

StemPy LabStemPy Lab
Which subphylum? New Biology
High School (11–12) · Chordates and Vertebrates

Each chordate below is described by where its notochord is in the young stage and in the adult. You will write a function that names the subphylum, sort six animals, and list the protochordates. The idea. Notochord go…

StemPy LabStemPy Lab
A Punnett square function New Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Biology by Computer

You will write the three pieces of a one-gene cross for flower colour in peas: purple (P) is dominant over white (p). The idea. A child takes one letter from each parent, sorted so the capital comes first. One P makes…

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
Hess's law by adding equations New Chemistry
High School (11–12) · Enthalpy and Hess's Law

Each equation is stored as a dictionary: products have positive numbers and reactants negative ones. A function add sums two equations and drops what cancels. You will use the burning of carbon and of carbon monoxide…

StemPy LabStemPy Lab
Words, repeats and ranks New Mathematics
High School (11–12) · Permutations and Combinations

Build three tools for word puzzles, and check them against brute force. The idea. A word with repeated letters has (n!)/(p! q!) arrangements. The rank of a word with different letters counts the words before it, one p…

StemPy LabStemPy Lab
Legs under a log New Biology
High School (11–12) · Non-chordates

A class turned over logs in a garden and recorded each animal it found, with its phylum and its number of legs. You will total the legs of the arthropods, count the animals of each phylum, and draw a bar chart. The id…

StemPy LabStemPy Lab
Fitting growth curves New Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Biology by Computer, Simulation and Randomness

You will write two fitting functions: one that finds the doubling time of exponential counts with a straight line through N, and one that finds r and K of logistic counts with curve_fit. The idea. For exponential coun…

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
A coffee-cup calorimeter New Chemistry
High School (11–12) · Enthalpy and Hess's Law

A student dissolves a salt in water in a foam cup and records the temperature before and after. You will find the temperature change, the heat taken up by the water, and the enthalpy of solution per mole. The idea. Th…

StemPy LabStemPy Lab
Counting arrangements two ways New Mathematics
High School (11–12) · Permutations and Combinations

Write the counting formulas yourself, and test them against a computer that lists every arrangement. The idea. ^nP_r = n(n - 1)(n - r + 1). Listing with itertools.permutations must give the same number. Your tasks. In…

StemPy LabStemPy Lab
A key from one telling feature New Biology
High School (11–12) · Non-chordates

Each non-chordate phylum has a feature that gives it away. You will finish a key that names the phylum from one feature, then use it on a list of animals. The idea. A dictionary can hold a key. Each telling feature is…

StemPy LabStemPy Lab
A population stepper New Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Biology by Computer, Simulation and Randomness

You will write the three small functions that grow a population in time steps: one exponential step, one logistic step, and a loop that runs the logistic steps for a given time. The idea. In a step of dt, an exponenti…

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 23
…

Showing 1–25 of 569