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.229 labs
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
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
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
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
A planet table in pandas Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Data Analysis with pandas

Make a table from lists and ask it a question. The checker looks at the columns, the shape and the answer.

StemPy LabStemPy Lab
Clean the table Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Data Analysis with pandas

Clean a table and pick rows from it. The checker uses a small table with missing values.

StemPy LabStemPy Lab
New columns Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Data Analysis with pandas

Add a column with Kepler's ratio, and a group mean. The checker tests that the given table does not change.

StemPy LabStemPy Lab
Group and join Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Data Analysis with pandas

Join two tables and count the groups. The checker uses small tables with a key in common.

StemPy LabStemPy Lab
Plot from a table Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Data Analysis with pandas

Draw a log-log graph from a table, and find its power. The checker looks at the axes of your graph and at the number.

StemPy LabStemPy Lab
Project: Kepler's third law Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Data Analysis with pandas

Write the analysis of the project as two functions. The checker uses exact data of a law with the power 1.5, with one missing value.

StemPy LabStemPy Lab
Roll the dice Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Simulation and Randomness

Write two small functions for the rolls of a die. The checker tests that the rolls are reproducible, that they are whole numbers from 1 to 6, and that the mean is right.

StemPy LabStemPy Lab
Estimate a probability Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Simulation and Randomness

Write two Monte Carlo estimates. The checker tests them against the exact values.

StemPy LabStemPy Lab
Random walk Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Simulation and Randomness

Simulate a random walk and the walk of many walkers. The checker tests the shape of the walk, the size of the steps and the law of the mean squared distance.

StemPy LabStemPy Lab
Simulate the decay Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Simulation and Randomness

Simulate the decay of a sample, and find its half-life in whole seconds. The checker compares the result with the exponential law.

StemPy LabStemPy Lab
Standard error Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Simulation and Randomness

Write the formula for the standard error of the mean and the bootstrap, and see that they agree. The checker uses a fixed list and a long list of numbers.

StemPy LabStemPy Lab
Project: measure g Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Simulation and Randomness

Write the functions of the pendulum project. The checker uses exact periods, and then a simulation of 1000 experiments.

StemPy LabStemPy Lab
Derivative from numbers Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Calculus by Computer

Write three tools that find slopes from numbers. The checker compares them with the exact slopes.

StemPy LabStemPy Lab
Area under a curve Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Calculus by Computer

Write the rules for areas as functions. The checker tests them on curves with known areas.

StemPy LabStemPy Lab
Integrals with quad Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Calculus by Computer

Use quad for three jobs. The checker compares your answers with known values.

StemPy LabStemPy Lab
Euler's method Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Calculus by Computer

Write Euler's method for one quantity that changes with the rate dy/dt = rate(t, y). The checker tests it on two equations with known answers.

StemPy LabStemPy Lab
Euler against exact Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Calculus by Computer

Measure the error of Euler's method for a falling ball with air drag, and see that it is first order. The checker compares your function with known numbers.

StemPy LabStemPy Lab
Project: landing range Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Calculus by Computer

Write the functions of the projectile project with air drag. The checker compares them with the physics without air, and with known values with air.

StemPy LabStemPy Lab
Bisection Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Solving Equations

Write the bisection method as a function. The checker solves four equations and tries a function without a change of sign.

StemPy LabStemPy Lab
Newton's method Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Solving Equations

Write Newton's method with the two safety rules: a limit of steps, and a stop when the slope is zero. The checker tries good and bad cases.

StemPy LabStemPy Lab
Polynomial tools Python Programming
High School (11–12), High School (9–10), Undergraduate, General · Solving Equations

Write three small tools with the polynomial functions of NumPy. The coefficients are listed from the highest power down. The checker uses polynomials with real and with complex roots.

StemPy LabStemPy Lab
Page 1 of 10
…

Showing 1–25 of 229