I've been trying to edit the repeat loop, but I'm having trouble drawing the list that makes up the face. Errors are returned every time. (Can lists even be drawn?) I also know I should use the win.getMouse() and win.close() functions, but I'm not sure as to whether they go inside the loop or outside.
from graphics import * import time def main(): winWidth = 300 winHeight = 300 win = GraphWin('Faces', winWidth, winHeight) win.setCoords(0, 0, winWidth, winHeight) head = Circle(Point(40,100), 25) head.setFill("yellow") head.draw(win) eye1 = Circle(Point(30, 105), 5) eye1.setFill('blue') eye1.draw(win) eye2 = Line(Point(45, 105), Point(55, 105)) eye2.setWidth(3) eye2.draw(win) mouth = Oval(Point(30, 90), Point(50, 85)) mouth.setFill("red") mouth.draw(win) faceList = [head, eye1, eye2, mouth] for i in range(6): win.getmouse() faceList.draw(win) main()