Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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

Postgresql 16 Administration Cookbook Solve Real World Database Administration Challenges With 180+ Practical Recipes And Best Practices

Authors: Gianni Ciolli ,Boriss Mejias ,Jimmy Angelakos ,Vibhor Kumar ,Simon Riggs

1st Edition

1835460585, 978-1835460580

More Books

Students also viewed these Databases questions