Sep-16-2017, 01:57 PM
In the future, post all code, the [b]entire[/] error code and outputs between the proper code tags.
This line:
Also, you don't need to say this:
This line:
population_density = (Population/land_area)You capitalized "population".
Also, you don't need to say this:
population = int('10')when
population = 10Trying to stay as close to your original code:
def population_density(): population = 10 land_area = 1 pop_density = population/land_area return pop_density density = population_density() print(density)
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition