A list gives the width of the annual ring made in each of ten years, taken from a core of a tree. You will find the age of the tree, the year of the widest ring, and the years with a very narrow ring.
The idea. One ring is made each year. A wide ring means a good year. A very narrow ring means a poor year, such as a dry one.
Your tasks.
age_in_rings so that it returns the number of rings in a list of rings.widest_year to the year of the widest ring.poor_years to the years whose ring is mm wide or less, in order.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…