You will write three functions that predict and test the products of dilute hydrochloric acid.
The idea. Metals give hydrogen. Carbonates and hydrogen carbonates give carbon dioxide. Sulphites and hydrogen sulphites give sulphur dioxide. Sulphides give hydrogen sulphide. Oxides and hydroxides give no gas. A white precipitate with silver nitrate, after a little dilute nitric acid, that dissolves in ammonium hydroxide shows a chloride.
Your tasks.
gas_from(kind). Return the name of the gas, or None.gas_volume(moles_solid) for a solid that gives one mole of gas per mole, in at S.T.P.is_chloride(colour, dissolves_in_ammonia).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…