Question: python Function Name: population Growth Parameters: starting population ( int ), growth rate ( float ), expected population (int) Returns: years (int) Description: City planners

python

python Function Name: population Growth Parameters: starting population ( int ), growth

Function Name: population Growth Parameters: starting population ( int ), growth rate ( float ), expected population (int) Returns: years (int) Description: City planners often have to make major decisions based on the anticipated growth of a city's population. These decisions can relate to anything from public policy to safety regulations. Given a city's starting population, an annual growth rate (as a %), and an expected population, help the city planners find out how many years it will take before the city exceeds that expected population. Write a function that returns this number of years. You must solve this using loops, and not any population growth formulas. >>> start = 135434 >>> rate = 4 >>> end = 246776 >>> print (populationGrowth(start, rate, end)) 16 >>> start = 345936 >>> rate = 1.5 >>> end = 584790

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!