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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!