from graphics import * import time def main(): win = GraphWin("Circles",800,600) # creating 800 x 600 pixels graphics window # with Title "Circles" T = Text(Point(400,20),"Drawing circles") # creating an object of type Text # the text "Drawin circles" will be positioned at x = 400, y=20 T.draw(win) # drawing in the graphics window c1 = Circle(Point(100,200),60)# first circle # define the second circle here c1.draw(win) # drawing in the graphics window # draw the second circle in the graphics window time.sleep(2) # waiting for 2 seconds L=Line(Point(100,200),Point(700,400)) # draw/display the line in the graphics window # changing the text message of object T T.setText("Click anywhere inside this window to change the fill color of the circles") win.getMouse() # waiting for a mouse click # change the fill color of the circle c1 # change the fill color of the circle c1 # changing the text message of object T T.setText("Click anywhere inside this window to close the graphics window") win.getMouse() # waiting for a mouse click win.close() # closing the graphics window main()