Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

python

image text in transcribed

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

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

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

Compare and contrast a forward contract with a futures contract.

Answered: 1 week ago

Question

1. Define and explain culture and its impact on your communication

Answered: 1 week ago