class Point: def __init__( self, xValue = 0, yValue = 0 ): self.x = xValue self.y = yValue def __str__( self ): return "( %d, %d )" % ( self.x, self.y ) point = Point( 72, 115 )print "X coordinate is:", point.xprint "Y coordinate is:", point.ypoint.x = 10point.y = 10print "The new location of point is:", point
Name (required)
email (will not be published) (required)
Website