A class turned over logs in a garden and recorded each animal it found, with its phylum and its number of legs. You will total the legs of the arthropods, count the animals of each phylum, and draw a bar chart.
The idea. Each record is a tuple: the name, the phylum and the number of legs. Animals without legs have .
Your tasks.
arthropod_legs to the total number of legs of the arthropods.count_by_phylum, return a dictionary from each phylum to the number of animals in it.legless to a list of the names of the animals with no legs, in the order of the records.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…