You will follow the tigers of a reserve year by year, with logistic growth and a loss to poaching, and find out when they pass a target.
The idea. Each year the number changes by
with the carrying capacity, the growth rate of a small population and the share killed by poachers.
Your tasks.
next_year, return the number of tigers a year later. Never return less than zero.run, return a list of the numbers for each year, starting with N0 and with years + 1 entries in all.first_year_above, return the first year in which the number is at or above target, or None if it never gets there in the years given.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…