Six animals are listed with six ranks, from the kingdom to the genus. You will find the lowest rank that two animals share, the closest relative of the house cat, and the animals that share only the kingdom with it. Then the program draws the shared ranks.
The idea. Go down the two lists together. The last rank before the first difference is the lowest shared rank. A lower shared rank means a closer relation.
Your tasks.
lowest_shared, return the name of the lowest rank that a and b share, or "none".closest to the animal, other than the cat, that shares the most ranks with the cat.only_kingdom to the animals that share only the kingdom with the cat.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…