You will finish a small program for the cation group scheme. A dictionary gives the group of each cation. A mixture is a list of cations.
The idea. Each group reagent takes out the cations of one group. The cations that remain go on to the next reagent.
Your tasks.
group_of(cation). It returns the group number.precipitated(mixture, g). It returns the list of cations in the mixture that belong to group g.left_after(mixture, g). It returns the list of cations in the mixture whose group is higher than g.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…