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 topics722 labs
An LC circuit in code New Physics
High School (11–12) · Alternating Current

You will write three functions for an LC circuit that has no resistance. The idea. The angular frequency is ω_0 = 1/√(LC). The charge on the capacitor is q = q_0ω_0 t. A capacitor charged to V_0 gives the largest curr…

StemPy LabStemPy Lab
From masses to a formula New Chemistry
High School (11–12) · Purification and Analysis of Organic Compounds

You will write functions for the analysis of an organic compound: the per cent of carbon and hydrogen from the masses of carbon dioxide and water, the per cent of nitrogen by the Kjeldahl method, and the empirical for…

StemPy LabStemPy Lab
Tangents and the circle inside New Mathematics
High School (9–10), General · Circles

You will write functions for the circle inside a triangle: the three tangent lengths, the radius, and a test for a four-sided figure that fits round a circle. Your tasks. In tangent_lengths, return the tuple (from A,…

StemPy LabStemPy Lab
Reading ring widths New Biology
High School (11–12) · Anatomy of Flowering Plants

A list gives the width of the annual ring made in each of ten years, taken from a core of a tree. You will find the age of the tree, the year of the widest ring, and the years with a very narrow ring. The idea. One ri…

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
Transformer and power line in code New Physics
High School (11–12) · Alternating Current

You will write three small functions about a transformer and a power line. The idea. For an ideal transformer the voltages are in the ratio of the turns. The efficiency is the power out divided by the power in, as a p…

StemPy LabStemPy Lab
Naming the spots of a chromatogram New Chemistry
High School (11–12) · Purification and Analysis of Organic Compounds

You will write two small functions for a TLC plate. One finds the R_f of a spot. The other names a spot by matching its R_f with known dyes run on the same plate. The idea. R_f is the distance moved by the spot divide…

StemPy LabStemPy Lab
A line and a circle in code New Mathematics
High School (9–10), General · Circles

You will write functions that decide how a line meets a circle, find the length of a tangent, and count the tangent lines in a list. Your tasks. In common_points, return 2, 1 or 0, the number of points a line at dista…

StemPy LabStemPy Lab
What the cambium made New Biology
High School (11–12) · Anatomy of Flowering Plants

A table gives the xylem cells and the phloem cells that a cambium made in each of six years. You will find the xylem cells for each phloem cell in every year. You will find the share of all the cells that became xylem…

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
Resonance and power in code New Physics
High School (11–12) · Alternating Current

You will write three functions for the resonance of a series circuit and for the power it takes. The idea. At resonance ω_0 = 1/√(LC) and Q = ω_0L/R. The average power is P = I_rms^2R, where I_rms = V_rms/Z. All value…

StemPy LabStemPy Lab
A fading pull and a stronger acid New Chemistry
High School (11–12) · Electronic Effects and Reaction Intermediates

A chlorine atom in an acid pulls electrons through the chain. You will find how much of the pull is left at a distance, and how much stronger the acid becomes when chlorine sits next to the acid group. The idea. In a…

StemPy LabStemPy Lab
Points on a circle New Mathematics
High School (9–10), General · Circles

You will test whether points lie on a circle, using the distance from its centre. Your tasks. In on_circle, return True when the point p is at distance r from centre, and False if not. Allow a tiny error: compare with…

StemPy LabStemPy Lab
Reading a leaf section New Biology
High School (11–12) · Anatomy of Flowering Plants

A student measured the layers of a leaf in a vertical section and counted the stomata on both faces of three leaves. You will total the layers, find the share of mesophyll, name the kind of leaf, and draw a bar chart.…

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
Impedance and phase in code New Physics
High School (11–12) · Alternating Current

You will write three small functions about a series LCR circuit. They use Z = √(R^2 + (X_L - X_C)^2) and φ = (X_L - X_C)/R. The idea. All the quantities are in ohm. The phase angle is positive when the circuit is indu…

StemPy LabStemPy Lab
Rank the carbocations New Chemistry
High School (11–12) · Electronic Effects and Reaction Intermediates

You have four carbocations. Each one is described by the number of hydrogen atoms on every carbon next to the positive carbon. You will count the helpful C-H bonds, rank the ions and measure the gap between the best a…

StemPy LabStemPy Lab
A cyclic quadrilateral test New Mathematics
High School (9–10), General · Circles

You will write the opposite angle of a cyclic quadrilateral, and a test for whether four angles can belong to one. Your tasks. In opposite, return the angle opposite to a given angle: 180^° minus it. In is_cyclic, ret…

StemPy LabStemPy Lab
Sorting tissues into their systems New Biology
High School (11–12) · Anatomy of Flowering Plants

Every tissue of the plant body belongs to one of the three tissue systems. You will finish a lookup table, write a function that uses it, and sort a list of tissues from a slide. The idea. A dictionary can hold the lo…

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
Reactance and phase in code New Physics
High School (11–12) · Alternating Current

You will write four functions that a circuit designer might use for a coil or a capacitor on an AC source. The idea. A coil has X_L = 2π f L and a capacitor has X_C = (1)/(2π f C). The rms current is the rms voltage d…

StemPy LabStemPy Lab
Page 1 of 29
…

Showing 1–25 of 722