Population dynamics 1

Variables, expressions, and statements

Population dynamics is a branch of ecology that studies changes in the size and composition of populations of living organisms. It is an essential topic within bioengineering because it provides insight into the interactions between organisms and their environment, as well as the factors affecting the growth and survival of populations. Population models help describe population growth. To establish these models, certain information is needed, such as the initial population. Another important parameter is the growth rate of a population. The growth rate indicates how many individuals are added (through births and immigration) or removed (through deaths and emigration). The growth rate can be calculated using the following formula:

\[r=\frac{births-deaths+immigration-emigration}{initial population size}\]

In this assignment, we will focus on the population of African elephants in Kruger National Park in South Africa. The African elephant is an endangered species, making it very important to gather data about the population. However, in wildlife parks, where these populations are closely monitored, they often grow too large, drastically altering the landscape and having ecological impacts. To study these populations, they can be modeled using mathematical models, for example in Python. In this assignment, we will use a specific type of growth, namely unlimited growth. Unlimited growth refers to the situation where there are no constraints on the growth of a population, such as food shortages or lack of space. This is often modeled using the following differential equation:

\[\frac{dN}{dt}=r*N\]

With solution:

\[N_t=N_0* e^{r*t}\]

with N_t representing the size of the population at time t, N_0 being the size of the population at time 0, r as the growth rate, and t as the time at which you want to calculate the size of the population.

Assignment

Write a Python script that includes the following functionalities.

\[r = \frac{births-deaths+immigration-emigration}{initial population size}\] \[N_t=N_0* e^{r*t}\]

Use the data below to test your code. These are figures from the year 1994.

Tips

Examples

Input:

>>> Enter the number of births: 458
>>> Enter the number of deaths: 186
>>> Enter the number of individuals immigrating: 63
>>> Enter the number of individuals emigrating: 27
>>> Enter the initial population size: 7806
>>> Enter the time (in years) for which you want to determine the number of individuals: 20

Output:

The growth rate is
0.03945682808096336
The number at time t is
17184