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.
metal(flame). It returns the metal from the table FLAMES, or None.anion(fizzes, baso4). It returns "carbonate", "sulphate" or "chloride".name(flame, fizzes, baso4). It joins the two, for example "sodium carbonate", and returns "unknown" if the flame names no metal.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 join the discussion.
Loading…