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
  • Computer 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. /Name the s-block compound
ChemistryMediumHigh School (11–12)Hydrogen and the s-Block Elements

Name the s-block compound

You will write a small program that names a white s-block salt from three observations: the flame colour, what happens with dilute hydrochloric acid, and whether barium chloride gives a white precipitate that stays in acid.

The idea. The flame names the metal. The acid test finds a carbonate (fizzing with an odourless gas that turns lime water milky). The barium chloride test finds a sulphate. Otherwise the salt is taken to be the chloride.

Your tasks.

  1. Complete metal(flame). It returns the metal from the table FLAMES, or None.
  2. Complete anion(fizzes, baso4). It returns "carbonate", "sulphate" or "chloride".
  3. Complete name(flame, fizzes, baso4). It joins the two, for example "sodium carbonate", and returns "unknown" if the flame names no metal.

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, try a salt that gives no flame colour and fizzes. Which two metals could it hold?

StemPy LabContributed by StemPy Lab
python
Loading Python runtime…

A worked solution

Run your code once to unlock the 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
← The Solvay process in numbersMetal in a mineral →
More onHydrogen and the s-Block Elements

Discussion (0)

Log in to join the discussion.

Loading…

More labs on this topic

  1. The Solvay process in numbersMedium
  2. When do the carbonates break up?Medium
  3. The easiest metal to ionise in waterMedium
  4. Strength of a hydrogen peroxide solutionMedium
  5. Hardness from an EDTA titrationMedium
All labs on this topic →