I have to creat a program that draws squares instead of circles. It also has to draw additional squares for each mouse click, and at the end print a message "Click again to quit" after the loop, and wait for a final clikc before closing the window. This is what I have so far, but I think there is something wrong, because instead of drawing circles it stays on the same place. Please help, thank you.
def main():
win = GraphWin()
shape= Rectangle(Point(300,300),Point(250,250))
shape.setOutline("red")
shape. setFill("red")
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)
message = Text(Point(0, 0, "Click anywhere to Quit")
message.draw(win)
win.close()
main()