You will write functions that keep the books of the carbon dioxide in the air of a model world.
The idea. The change in the air in a year is what goes in (respiration, decomposition and burning) minus what comes out (photosynthesis). A steady change repeats every year.
Your tasks.
net_change. It gives the change in the air in a year.air_after. It gives the amount in the air after a number of years.years_until. It gives the first year in which the air holds at least a limit.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…