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
Choose a topic to see its subtopics.42 labs
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
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
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
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
A root checker New Mathematics
High School (9–10), General · Quadratic Equations

You will write a function for the left side of a quadratic equation, use it to test roots, and pick the roots out of a list. The idea. A number is a root of ax^2 + bx + c = 0 when the left side is 0 there. A computer…

StemPy LabStemPy Lab
Split the middle term by computer New Mathematics
High School (9–10), General · Quadratic Equations

You will write a function that finds the split of the middle term, use it to get the roots, and solve a problem about a photograph. The idea. For ax^2 + bx + c you need p and q with p + q = b and p × q = a × c. Then a…

StemPy LabStemPy Lab
A quadratic solver New Mathematics
High School (9–10), General · Quadratic Equations

You will write the quadratic formula as a Python function and use it. Your tasks. In discriminant, return b^2 - 4ac. In roots, return the list of real roots, the one with + first. Return an empty list when the discrim…

StemPy LabStemPy Lab
Sorting equations by their roots New Mathematics
High School (9–10), General · Quadratic Equations

The discriminant sorts quadratic equations into three kinds without solving them. You will write the sorter and use it. Your tasks. In nature, return "two distinct", "equal" or "none", from D = b^2 - 4ac. Set none_cou…

StemPy LabStemPy Lab
Test the sum formulae at many angles New Mathematics
High School (11–12) · Compound and Multiple Angles, Trigonometric Identities

A formula is an identity when it holds at every angle. The computer can test five hundred pairs of angles in a moment. You will write the formula for (x + y), find its largest error, and count how often the false rule…

StemPy LabStemPy Lab
Archimedes and the half angle New Mathematics
High School (11–12) · Compound and Multiple Angles, Trigonometric Identities

Archimedes found π by drawing polygons inside a circle and doubling the number of sides again and again. A regular polygon with n sides inside a circle of radius 1 has half-perimeter n(π)/(n), which comes closer and c…

StemPy LabStemPy Lab
Which quadrant? New Mathematics
High School (11–12) · Trigonometric Functions and Graphs

Write three small functions that a calculator would need: one takes away whole turns, one finds the quadrant, and one lists the functions that are positive. The idea. x % (2 * math.pi) takes away whole turns. Dividing…

StemPy LabStemPy Lab
Read a wave from its equation New Mathematics
High School (11–12) · Trigonometric Functions and Graphs

A wave is y = a(bx + c) + d with a = -2.5, b = 3, c = 1.2 and d = 4. Find its amplitude, its period, its highest and lowest values, and the first x > 0 where it is highest. The program then draws it, so you can see yo…

StemPy LabStemPy Lab
Degrees and radians, both ways New Mathematics
High School (11–12) · Angles and Radian Measure

You will write two small functions that change the unit of an angle, and use one of them to write angles as multiples of π. The idea. π rad = 180^°. So multiply by (π)/(180) for radians, and by (180)/(π) for degrees.…

StemPy LabStemPy Lab
A wheel on the road New Mathematics
High School (11–12) · Angles and Radian Measure

A cart has wheels of radius 0.3 m, which turn 180 times each minute. You will find how far it goes in one turn, its angular speed, its speed, and the turns and the time for a trip of 1500 m. The idea. One turn moves t…

StemPy LabStemPy Lab
When does d divide a² but not a? New Mathematics
High School (9–10), General · Rational and Irrational Numbers

For a prime d, if d divides a^2 then d divides a. For other numbers it can fail. You will find every divisor d from 2 to 20 that fails, and look at what they have in common. The idea. For one d, try a = 1, 2, 3, and l…

StemPy LabStemPy Lab
Near misses for the root of 2 New Mathematics
High School (9–10), General · Rational and Irrational Numbers

No fraction has a square of exactly 2. But some come very close. For each bottom q, take the top p nearest to q√(2), and measure the miss p^2 - 2q^2. You will find the bottoms up to 1000 where the miss is only 1 or -1…

StemPy LabStemPy Lab
A prime factoriser New Mathematics
High School (9–10), General · Divisibility, HCF and LCM

You will write a function that breaks a number into primes, then use it to test for primes and to find numbers in which no prime repeats. The idea. Divide by 2 while you can, then by 3, then by 4 (which never divides,…

StemPy LabStemPy Lab
Euclid's quick HCF New Mathematics
High School (9–10), General · Divisibility, HCF and LCM

You will write Euclid's division method as a function, build the LCM from it, and use both on a timetable. The idea. While b is not 0, replace the pair (a, b) by (b, r), where r is the remainder of a divided by b. Whe…

StemPy LabStemPy Lab
Fit a model to noisy data Mathematics
High School (11–12) · Functions as Models of Data

Least squares picks the straight line that makes the squared errors smallest. For a line it has a short formula, which you will write and use on six noisy readings. The idea. m = Σ (x - x)(y - y)Σ (x - x)^2 and c = y…

StemPy LabStemPy Lab
Which comes first? Mathematics
High School (11–12) · Composite and Inverse Functions

In Python a function is a value, so you can build f ° g as a new function. You will compose two machines and find where the order does not matter. The idea. compose(f, g) returns a new function that does g first and t…

StemPy LabStemPy Lab
A function and its mirror image Mathematics
High School (11–12) · Composite and Inverse Functions

An inverse undoes a function, and its graph is the mirror image in y = x. You will write an inverse, test the round trip, and check that mirrored points land on the inverse. The idea. For f(x) = 3x - 2, solving y = 3x…

StemPy LabStemPy Lab
Move a parabola Mathematics
High School (11–12) · Graphs of Functions

Moving y = x^2 gives y = a(x - h)^2 + k. You will find a vertex from the standard form, turn the vertex form back into the standard form, and find the zeros. The idea. The vertex of ax^2 + bx + c is at x = -(b)/(2a).…

StemPy LabStemPy Lab
The four special functions Mathematics
High School (11–12) · Graphs of Functions

The modulus, the signum, the greatest integer and the fractional part are all short rules. You will write three of them without the math module, and test them on tricky inputs. The idea. int(x) cuts off the decimals,…

StemPy LabStemPy Lab
Move, stretch and flip a graph Mathematics
High School (11–12) · Graphs of Functions

Every change to a graph moves each point in a simple way. You will write the moves for a shift, a stretch and the two flips, and follow one point through them. The idea. On y = f(x - h) + k the point (p, q) goes to (p…

StemPy LabStemPy Lab
Is it a function? Mathematics
High School (11–12) · Relations and Functions

A relation is a list of pairs. It is a function on a domain when every element of the domain appears exactly once as a first entry. You will test that and read off images. The idea. Count how often each element of the…

StemPy LabStemPy Lab
Page 1 of 2

Showing 1–25 of 42