You will write three small functions about the layers of sedimentary rock in a cliff.
The idea. Each layer is written as (rock, thickness in m, mm laid down each year), from the bottom of the cliff to the top. The time a layer took is its thickness in mm divided by the rate.
Your tasks.
years, return how many years a layer thickness m thick took, at rate mm a year.total_years, return the years that all the layers of the list layers took together.oldest, return the name of the oldest rock in the list.Run your code once to unlock the worked solution.
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…