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. /A water checker
ChemistryEasyHigh School (9–10)Mixtures and Solutions

A water checker

You will write four small functions for the first two lessons. One gives the result of the copper(II) sulfate test. One decides whether a sample could be pure water from its melting point and boiling point. One finds the chlorine for a tank. One finds the volume of water that a cylinder of chlorine can treat.

The idea. Anhydrous copper(II) sulfate is white and turns blue with water. Pure water melts at 0 ∘C0\ ^\circ\text{C}0 ∘C and boils at 100 ∘C100\ ^\circ\text{C}100 ∘C. A tank of VVV cubic metres at a dose of ddd milligrams for each dm³ needs V×dV \times dV×d grams of chlorine.

Your tasks.

  1. Complete test_result(has_water), which gives "blue" or "white".
  2. Complete looks_pure(melting, boiling), which is true when both points are within 0.2 ∘C0.2\ ^\circ\text{C}0.2 ∘C of the pure values.
  3. Complete chlorine_grams(volume_m3, dose).
  4. Complete cylinder_treats(cylinder_kg, dose), which gives the volume of water in cubic metres.

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, call looks_pure(0.0, 100.0) and looks_pure(-2.0, 101.0). Which one is pure water?

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
← A ppt. calculator for the halide testA fertiliser calculator →
More onMixtures and Solutions

Discussion (0)

Log in to join the discussion.

Loading…

More labs on this topic

  1. Element, compound or mixture?Easy
  2. The ratio of hydrogen to oxygen in compoundsEasy
  3. Which method of separation?Easy
  4. Reading a chromatogramEasy
  5. Solubility curvesMedium
All labs on this topic →