Question: i need the solutio please Task2:- In a small town the population is po 1000 at the beginning of a year. The population regularly increases

 i need the solutio please Task2:- In a small town the

i need the solutio please

Task2:- In a small town the population is po 1000 at the beginning of a year. The population regularly increases by 2 percent per year and moreover 50 new inhabitants per year come to live in the town. How many years does the town need to see its population greater or equal to p 1200 inhabitants? At the end of the first year there will be: 10001000 0.0250- 1070 inhabitants At the end of the 2nd year there will be: 1070+1070 0.02 501141 inhabitants (number of inhabitants is an integer) At the end of the 3rd year there will be: 1141 1141 0.02 501213 It will need 3 entire years. More generally given parameters: po, percent, aug (inhabitants coming or leaving each year), p (population to surpass) the function nb_year should return n number of entire years needed to get a population greater or equal to p aug is an integer, percent a positive or null number, po and p are positive integers (>0)

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!