Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1- Population Growth [15 pts] The population growth in a given country can be estimated using this simplified formula: Pn = (1+r)P-+ Pr: population

image text in transcribed

Question 1- Population Growth [15 pts] The population growth in a given country can be estimated using this simplified formula: Pn = (1+r)P-+ Pr: population for yearn P -: population for year n-1 r: rate of growth (which is the birth rate minus the death rate) 1: immigration (which is the number of immigrants that the country received during year n) Write a Python function that, given P r and I will generate the population growth for x number of years and will store the result for each year as an element in a Python List. The function should also return the Python List. The signature of the function is: getGrowth(population_year_zero, rate, immigration_per_year, nbr_of_years) For example, if the population for year zero was 1000., the rate of growth is 2% (0.02), immigration per year is 10 and we want to generate a table of 3 years, then the call for the function should be: growth_table = getGrowth(1000, 0.02, 10,3) Then if you print the result with print(growth_table) you should get a result like this: 2 [1030.0, 1060.6, 1091.812] which represents the list of the values for year 1, year 2 and year 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago