# # # from graphics import * # importing all the commands from graphics library, # for direct use def main(): win=GraphWin() # creates a window p1=Point(30,30) # create a point that is assigned to p1 p2=Point(30,100) # create a point that is assigned to p2 p1.draw(win) # draw point p1 p2.draw(win) # draw point p2 p1_x=p1.getX() # get the x-coordinate of point p1 p1_y=p1.getY() # get the y-coordinate of point p1 p2_x=p2.getX() # get the x-coordinate of point p2 p2_y=p2.getY() # get the y-coordinate of point p2 print "The x-coordinate of the first point is %d, the y-coordinate is %d" %(p1_x, p1_y) print "The x-coordinate of the second point is %d, the y-coordinate is %d" %(p2_x, p2_y) print "Drawing colored points" circle=Circle(p2,10) circle.draw(win) x=input("Please, input any value to destroy the window and to finish the program:") win.close() main()