Python Forum
New beginner, defining point help :(
Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New beginner, defining point help :(
#3
Beside unindenting class definition you need to unindent both ToString methods, and your test code, so it would look like:
class Point():
   def __init_(self, x, y):
       ....
   def ToString(..
        ....
class Circle(Point):
   def __init__(...
       ...
   def ToString(..
       ....

p = Point ...
Morever you need to use __init__(double underscore) instead of _init_.
Reply


Messages In This Thread
New beginner, defining point help :( - by Armandas - Apr-24-2017, 09:17 PM
RE: New beginner, defining point help :( - by zivoni - Apr-24-2017, 09:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  connecting the first point to the last point Matplotlib omar_mohsen 0 4,682 Jan-15-2020, 01:23 PM
Last Post: omar_mohsen

Forum Jump:

User Panel Messages

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