Lab 15: Predators and Prey

For this lab, write a predators and prey simulation, with cougars and deer. Assume you are considering purchasing a variety of unpopulated islands, and starting a population of deer and cougars on the islands. For each island, you know how many deer the habitat can support, and intend to bring an initial population of 100 deer and 20 cougars. The simulation should display, for each year, how many deer and cougars are born, how many deer are eaten, how many deer and cougars die, and how many "surplus" deer die off due to overpopulation. Assume the following facts:
  1. Deer produce an average of two offspring per female each year, and half the population is female. So an average of 1 deer born per live adult deer.
  2. Cougars eat 42 deer per year each, and have two kittens per female per year IF there are enough deer. Again, half the population is female.
  3. If the habitat cannot support all the deer, cougars eat 50 deer each instead of 42.
  4. If there are NOT enough deer, cougars produce an average of one kitten per female.
  5. If there are not enough deer, half the cougars die.
  6. If there are too many deer after the cougars have eaten, 30% of the deer die.
Your simulation should have a loop that repeats once per year. Implement the rules above in your loop to simulate a year, and print out the status after each year. Run the simulation for 30 years.

Lab Report

For this lab, produce a report showing the results of the simulation for an island that can support 1000 deer. Then, re-run the simulation with an initial population of 300 deer instead of 100. Finally, run the simulation with a maximum population of 10000, an initial population of 1000 deer, and 20 cougars. Upload the report, but show me first so I can check you off as "done" and you can be unconcerned about lab grades. Include your code with your report.