A field team has recorded the main pigment and the stored food of eight seaweeds. You will write a key that names the class, count the seaweeds of each class, and list the red ones. Then the program draws the counts.
The idea. Phycoerythrin and floridean starch mean a red alga. Fucoxanthin with laminarin or mannitol means a brown alga. Chlorophyll b with starch means a green alga.
Your tasks.
algal_class, return "green", "brown" or "red".counts to a dictionary of each class and the number of seaweeds in it.red_ones to the names of the red seaweeds, in the order of the list.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 11 more problems and 2 Python labs. Everything you have used here stays free, always.