You will write a small key that names a leaf from two questions, use it on six leaves, and count how many are compound.
The idea. First ask whether the cuts of the blade reach the midrib. If they do not, the leaf is simple. If they do, the leaf is compound. It is pinnate when the leaflets sit on one axis, and palmate when they join at one point.
Your tasks.
leaf_kind so that it returns "simple", "pinnately compound" or "palmately compound".kinds to the kind of each leaf in leaves, in order.n_compound to the number of compound leaves.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…