#------------------------------------------------------------------------------ # Point2.py #------------------------------------------------------------------------------ class Point: """ Point class encapsulates two numbers (xcoord, ycoord). """ def __init__(self): """ Create a new point at the origin. """ self.xcoord = 0 self.ycoord = 0 # end __init__() # end class Point #-- main (test Point class) --------------------------------------------------- p = Point() p.xcoord = 2.3 p.ycoord = 3.5 q = Point() q.xcoord = 5.8 print(p.xcoord, p.ycoord) print(q.xcoord, q.ycoord)