You will write functions that describe salts of a chromium complex. One counts the ions outside the bracket. One decides whether two salts are isomers. One says what silver nitrate precipitates.
The idea. Isomers have the same total of metal, ligands and ions. Only the ions outside the bracket are free to precipitate. Each salt is a pair: a table of the ligands inside the bracket and a table of the ions outside.
Your tasks.
free_ions(salt) so that it returns the number of ions outside the bracket.are_isomers(first, second) so that it returns True when the two totals are equal and the two salts are different.silver_nitrate(salt) so that it returns the moles of "AgCl" and "AgBr" that one mole of the salt gives, as a table. Leave out a precipitate that does not form.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…