You will write four small functions for the electrolysis of molten compounds. One decides whether a substance conducts. One gives the product at each electrode. One finds the moles of metal that electrons make. One finds the mass of that metal.
The idea. A metal or graphite conducts in every state. An ionic compound conducts only when it is molten or dissolved. A molecular substance never conducts. In a molten binary compound the metal forms at the cathode and the non-metal at the anode. A metal ion with a charge of takes electrons, so moles of metal .
Your tasks.
conducts(kind, state).molten_products(metal, nonmetal) so that it returns the pair (cathode product, anode product). The anode product is the formula of the non-metal molecule, for example Br2.moles_of_metal(electrons, charge).mass_of_metal(electrons, charge, ar).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…