Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unusual error message
#1
This is my code:

### population density
def population_density (population,land_area):
    population = int('10')
    land_area = 1
    population_density = (Population/land_area)
    return
print(population_density)
Error message:
Error:
<function population_density at 0x03E69348>
Any help will be appreciated
VISHU
Reply
#2
In the future, post all code, the [b]entire[/] error code and outputs between the proper code tags.

This line:
    population_density = (Population/land_area)
You capitalized "population".
Also, you don't need to say this:
    population = int('10')
when
population = 10
Trying 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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error message about iid from RandomizedSearchCV Visiting 2 1,000 Aug-17-2023, 07:53 PM
Last Post: Visiting
  Another Error message. the_jl_zone 2 971 Mar-06-2023, 10:23 PM
Last Post: the_jl_zone
  Mysql error message: Lost connection to MySQL server during query tomtom 6 15,937 Feb-09-2022, 09:55 AM
Last Post: ibreeden
  understanding error message krlosbatist 1 1,895 Oct-24-2021, 08:34 PM
Last Post: Gribouillis
  Error message pybits 1 39,370 May-29-2021, 10:26 AM
Last Post: snippsat
  Unusual Error Led_Zeppelin 1 2,357 Apr-21-2021, 05:42 PM
Last Post: Larz60+
  f-string error message not understood Skaperen 4 3,317 Mar-16-2021, 07:59 PM
Last Post: Skaperen
  Overwhelmed with error message using pandas drop() EmmaRaponi 1 2,351 Feb-18-2021, 07:31 PM
Last Post: buran
  Winning/Losing Message Error in Text based Game kdr87 2 2,972 Dec-14-2020, 12:25 AM
Last Post: bowlofred
  Don't understand error message Milfredo 2 2,044 Aug-24-2020, 05:00 PM
Last Post: Milfredo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020