HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_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
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Python Labs
  2. /Changing units
MathematicsEasyHigh School (9–10)Mensuration

Changing units

You will write a small unit converter for lengths, areas and volumes, and use it on a tank.

Your tasks.

  1. In length, return value changed from the unit start to the unit end.
  2. In area, return value changed from the area unit start to the area unit end. For example area(1, "m", "cm") is the number of square centimetres in one square metre.
  3. Set litres to the capacity in litres of a tank 120 cm120\ \text{cm}120 cm long, 50 cm50\ \text{cm}50 cm wide and 40 cm40\ \text{cm}40 cm high.

Run it first, just as it is. The checker at the end prints FAIL for each task. Then do the tasks one at a time, and run the program again after each one. A Hint appears under every check that still fails.

When every line says PASS, add a function volume that uses the length factor three times, and test it with one cubic metre in cubic centimetres.

StemPy LabContributed by StemPy Lab
python
Loading Python runtime…

A worked solution

Have you tried it?

Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.

Log in to save
← All Labs
← Finding the order of rotational symmetryReflect, turn and slide points →
More onMensuration

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Metric units of measureSymmetry and Units of Measure

More labs on this topic

  1. Volume of a frustum two waysMedium
  2. A frustum and its complete coneEasy
  3. Recasting and fillingMedium
  4. Volumes of joined solidsEasy
  5. A toy and a tent
Medium
All labs on this topic →