You will write one small step of the Lotka-Volterra equations and use it to follow the prey and the predators.
The idea. In a small time , the prey change by and the predators by . This is a model for A-Level and IB.
Your tasks.
step. It gives the new prey and the new predators after a time dt.run. It repeats the step n times, and gives the last prey and the last predators.peak_year to the time at which the predators are most numerous in the first years.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…