I created a function that creates smiley faces. I want to print more than 1 (with different size and location) on 1 window. How do I do it? Here is the code:
from graphics import *
def main():
print drawface(Point(40, 40), 20, GraphWin)
print drawface(Point(90, 90), 30, GraphWin)
print drawface(Point(130, 160), 10, GraphWin)
def drawface(center, size, win):
win = GraphWin()
win.setBackground('white')
center = Circle(center, size)
center.draw(win)
Point1 = center.getCenter()
Point2 = size * .20
Point3 = size * .30
Point4 = size * .40
Point5 = size * .25
lefteye = Circle(Point1, Point2)
lefteye.move(-Point3, -Point2)
lefteye.draw(win)
righteye = Circle(Point1, Point2)
righteye.move(Point3, -Point2)
righteye.draw(win)
mouth = Circle(Point1, Point3)
mouth.move(0, Point4)
mouth.draw(win)
mouth2 = Circle(Point1, Point3)
mouth2.setFill('white')
mouth2.setOutline('white')
mouth2.move(0, Point5)
mouth2.draw(win)
main()