1. Engineering
  2. Computer Science
  3. pyhton...

Question: pyhton...

Question details

5.27 LAB: Predator-Prey Simulation In a predator-prey simulation, you compute the populations of predators and prey using the following equations prey(t +1) prey(t) x (1A- Bx pred(t) pred(t +1)-pred(t) x (1-C+ D x prey(t) Here, A is the rate at which prey birth exceeds natural death, B is the rate of predation, C is the rate at which predator deaths exceed births without food, and D represents predator increase in the presence of food. The units of time t are expressed in years. Write a program that prompts the user for the initial population sizes, these rates, and the number of years. Then print the populations for the given number of years after your simulation has completed. Hint: This can be accomplished in about 15 lines of code.PYHTON

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution