""" triangle.py Click three points and draw a triangle. We worked on this in breakout rooms. It's also in Zelle's book and his slides; see https://mcsp.wartburg.edu/zelle/python/ppics3/code/chapter04/triangle.pyw """ from graphics import * window = GraphWin("triangle", 600, 600) p1 = window.getMouse() p1.draw(window) p2 = window.getMouse() p2.draw(window) p3 = window.getMouse() p3.draw(window) triangle = Polygon(p1, p2, p3) triangle.setFill('lime') triangle.draw(window) wait = window.getMouse()