I'M USING PYTHON 3.2.1
================
So I have bought a book few days ago and got to it today. Its called "More Python Programming for the absolute beginner by Jonathan S. Harbour. I have copied the code to see how it works. On the way I experience few annoying errors I can't find a way to solve. Help would be nice
ERROR:
line 1, in <module>
class Point():
========================
line 13, in Point
class Circle(Point):
================
So I have bought a book few days ago and got to it today. Its called "More Python Programming for the absolute beginner by Jonathan S. Harbour. I have copied the code to see how it works. On the way I experience few annoying errors I can't find a way to solve. Help would be nice

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
class Point(): x = 0.0 y = 0.0 def _init_( self ,x,y): self .x = x self .y = y print ( "Point constructor" ) def ToString( self ): return "{X:" + str ( self .x) + ",Y:" + str ( self .y) + "}" class Circle(Point): radius = 0.0 def _init_( self ,x,y,radius): super ()._init_(x,y) self .radius = radius print ( "Circle constructor" ) def ToString( self ): return super ().ToString() + \ ",{RADIUS=" + str ( self .radius) + "}" p = Point( 10 , 20 ) print (p.ToString()) c = Circle( 100 , 100 , 50 ) print (c.ToString()) |
line 1, in <module>
class Point():
========================
line 13, in Point
class Circle(Point):