During the previous assignment, we calculated how many elephants would live in Kruger National Park after 20 years. In this assignment, we will continue working with the script we wrote and use the same data.
It is important for researchers to closely monitor the evolution of the population. To facilitate this, the previous script will be modified to include an automatic alert if the population exceeds or falls below a certain critical value.
The growth rate of a population can be positive, negative, or zero. A positive growth rate (r>0) indicates that the population is increasing in size. This can result from factors such as births, immigration, or favorable environmental conditions. A negative growth rate (r<0) indicates that the population is decreasing in size. This may be due to factors such as deaths, emigration, or unfavorable environmental conditions. A growth rate of zero (r=0) indicates that the population size remains constant, which can occur when births and deaths, as well as immigration and emigration, balance each other out.
Write a Python script that includes the following functionalities.
as a reminder:
\[N_t=N_0* e^{r*t}\]Input:
>>>Enter a growth rate: 0.03946
>>>Enter the initial size of the population: 7806
>>>Enter the time (in years) for which you want to determine the number of individuals: 20
>>>Enter the carrying capacity: 50000
Output:
The population is increasing.
The carrying capacity is not exceeded.
20