Question
Write the simulation loop: Rabbits are taking over Woodland Park! The current population is 190. The city has decided to remove some rabbits to a
Write the simulation loop:
Rabbits are taking over Woodland Park! The current population is 190. The city has decided to remove some rabbits to a rural farm under certain circumstances. Your job is to write a program that will predict the population each year if this plan is implemented. Write a program that simulates the following situation and prints out what the population will be at the end of each year for the first 10 years:
The initial population of rabbits is 190. At the beginning of each year, if the current population is greater than 150, the city will capture 100 rabbits and take them away from the park (to a nice farm in Yakima). Otherwise, they will do nothing.
During the rest of the year, the remaining rabbit population doubles through a combination of normal births and deaths.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started