from graphics import * import math window = GraphWin("Smile!", 500, 700) raw_input('Hit Enter to continue.') window.setBackground(color_rgb(210,245,214)) raw_input('Hit Enter to continue.') # Set the coordinate system so each pixel is 1 unit, and the origin is in # the lower-left corner. window.setCoords(0,0,499,699) center = Point(250,350) head = Circle(center, 225) head.setFill("yellow") head.setOutline("black") head.setWidth(3) head.draw(window) raw_input('Hit Enter to continue.') smile = Circle(center, 135) smile.setOutline("black") smile.setWidth(5) smile.draw(window) raw_input('Hit Enter to continue.') antismile = Rectangle(Point(112, 350), Point(388, 488)) antismile.setFill("yellow") antismile.setWidth(0) antismile.draw(window) raw_input('Hit Enter to continue.') eye_left = Oval(Point(295, 418), Point(340, 488)) eye_left.setFill("black") eye_left.draw(window) raw_input('Hit Enter to continue.') eye_right = Oval(Point(205, 418), Point(160, 488)) eye_right.setFill("black") eye_right.draw(window) # Wait for user to admire the art before closing the window. raw_input('Hit Enter to close the window.') window.close()