# # file: quadrilateral.py # # This program gets 4 mouse clicks from the user then draws a quadrilateral from graphics import * def main(): win=GraphWin("Drawing a quadrilateral",480,360) win.setBackground('white') message=Text(Point(240,10),"Please click a mouse somewhere in this window 4 times.") message.draw(win) p_1=win.getMouse() p_2=win.getMouse() p_3=win.getMouse() p_4=win.getMouse() p=Polygon(p_1,p_2,p_3,p_4) p.setOutline('green') p.setFill('yellow') p.draw(win) message.setText("Click once more to close the window.") x=win.getMouse() win.close() main()