You will write functions that find the oxidation state of sulphur in an oxoacid, tell whether the acid has an O-O peroxide link, and list the acids that have a given state.
The idea. Oxygen is , except in an O-O link, where each oxygen atom is . Hydrogen is . The molecule is neutral, so the sulphur atoms must balance the rest.
Your tasks.
oxidation_state(name) so that it returns the average oxidation state of sulphur.has_peroxo(name) so that it returns True when the acid has an O-O link.acids_with_state(state) so that it returns the list of acid names with that state, in the order of the table.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…
With Standard, you also open 12 more problems, 2 Python labs and 1 extra course. Everything you have used here stays free, always.