Hello

How would I get the following program to draw squares instead of circles?


from graphics import*

def main():
   win=GraphWin()
   shape = Circle(Point(50,50), 20)
   shape.setOutline("red")
   shape.setFill("blue")
   shape.draw(win)
   for i in range(10):
       p = win.getMouse()
       c = shape.getCenter()
       dx = p.getX() - c.getX()
       dy = p.getY -c.getY()
       shape.move(dx,dy)
   win.close()
main()
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to