#### Animal Population

Posted : 11 months ago

Write a Python program that analyzes rabbit and wolf population in an island and its influence on the grass area. Grass area in the island grows at a constant rate every year through rains, but is gradually depleted due to continuous consumption by rabbits. Rabbit population grows at a constant rate every year but is constrained by wolves attack. Wolf population grows at a constant rate every year but rapid decline occur in regular intervals through spread of epidemic diseases.

Your input section should look like the following:

Enter wolf population (initial): 10
Enter rabbit population (initial): 2300
Enter total grass area, initially fertile (in sq yards): 40000
Enter wolf annual growth rate (in percentage): 20
Enter rabbit annual growth rate (in percentage): 30
Enter grass area annual growth rate (in percentage): 5

These inputs along with below constraints will be used to calculate wolf population, rabbit population and available grass area, for each year.

Wolf Population (2nd Column): Wolf population grows annually at the specific growth rate input by user. Apart from this, every 5 years wolf population decreases to half of previous year population due to widespread epidemic diseases. Given initial wolf population, calculate wolf population for each year (Hint: Use modulo operator for computing population in disease spreading years). Every year, wolf population needs to be updated based on its growth rate as follows.

WolfPopulation = PreviousWolfPopulation ∗ (1 + WolfGrowthRate=100)

Further, once in every 5 years except year 1 (i.e., only in years 6,11,16), Wolf population must be made half of previous year’s Wolf population.
Rabbit Population (3rd column): Rabbit population grows annually at the specific growth rate input by user. Apart from this, each wolf kills 50 rabbits every year for their survival, apart from other prey.

RabbitPopulation = PreviousRabbitPopulation ∗ (1 + RabbitGrowthRate=100) - PreviousWolfP opulation ∗ 50

Available grass area (4th column): Grass area grows annually at the specific growth rate input by user. Rabbits in this island consume grass continuously, and every year, each rabbit depletes grass in 1.2 sq yards of fertile grass area, and make it barren (due to rabbit consumption and insufficient rains for regrowth).

GrassArea = P reviousGrassArea∗(1+GrassGrowthRate=100)-P reviousRabbitP opulation∗1:2

Your program should calculate and print the following data in a table format: Year, Wolfpopulation in specific year, Rabbit population in specific year, Available grass area (in sq yards).

Your final program output should look like the following:

Enter wolf population (initial): 10
Enter rabbit population (initial): 2300
Enter total grass area, initially fertile (in sq yards): 40000
Enter wolf annual growth rate (in percentage): 20
Enter rabbit annual growth rate (in percentage): 30
Enter grass area annual growth rate (in percentage): 5

Find full instructions in the attached file.