You will turn the number of shared corners of a silicate into its oxygen count, its charge and its family, and find how many metal ions balance it.
The idea. A tetrahedron that shares corners has oxygen atoms of its own. Each oxygen is and silicon is , so the charge for each silicon is .
Your tasks.
oxygen_per_silicon(s) so that it returns the oxygen atoms for each silicon.charge_per_silicon(s) so that it returns the charge for each silicon, as a negative number or zero.family(s) so that it returns the name of the family: 0 orthosilicate, 1 pyrosilicate, 2 chain or ring, 2.5 double chain, 3 sheet, 4 framework.cations(s, charge) so that it returns how many metal ions of that charge balance one silicon.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…