How to draw a face in Python (GUI)
<p>Let me preface first with I have only ever worked with Java, so Python is really new to me. As a result, I'm having a lot of trouble even checking whether my programs work. It's frustrating.  (By the way, I'm working with Python 2.7)</p>

<p>This currently produces an 'X' that can be moved around when I press the "Eyes" button, but I'm supposed to make a face like the one here: <a href="https://www.cs.montana.edu/hunterl/132/labs/Python/" rel="nofollow noreferrer">https://www.cs.montana.edu/hunterl/132/labs/Python/</a></p>

<p>I cannot figure out how to draw the face. I know it has something to do with</p>

<pre><code>c = Circle(Point(50,50), 10)
    c.draw(win)
</code></pre>

<p>But every time I try to implement it in python, nothing happens. I don't know what I need to do to change the 'X' and make a circle with two smaller circles for eyes and a line for a mouth. Any help would be much appreciated. I'm at a complete loss and seriously just want to give up.</p>

<p>Here's the code:</p>

<pre><code>from button import Button 
</code></pre>

<p><code>from tick import Tick</code></p>

<pre><code>def main():
    win = GraphWin("Face Mover", 250, 250)
    win.setCoords(0, 0, 10, 10)
    win.setBackground("green")

    tic = Tick(win, Point(5,5), 2)  #the window, middle, size of drawing

    eyesButt = Button(win, Point(3, 1), 3, 1, "Eyes")
    talkButt = Button(win, Point(7, 1), 3, 1, "Talk")
    quitButt = Button(win, Point(5, 9), 2, 1, "Quit")

    eyesButt.activate()
    talkButt.activate()
    quitButt.activate()

    pt = win.getMouse()
    while not quitButt.clicked(pt):
        if eyesButt.clicked(pt):
            tic.newSpot(win)
        pt = win.getMouse()

    win.close()
     main()
</code></pre>

<p>next class</p>

<pre><code>from graphics import *
from random import randint

class Tick:
    def __init__(self, window, center, size):
        self.center = center

        p1 = Point(randint(1,9), randint(1,8))
        self.p2, self.p3 = p1.clone(), p1.clone()
        self.p2.move(-.3, -.3)
        self.p3.move(.3, .3)
        self.p4, self.p5 = p1.clone(), p1.clone()
        self.p4.move(-.3, .3)
        self.p5.move(.3, -.3)

        self.line1 = Line(self.p2, self.p3)
        self.line2 = Line(self.p4, self.p5)

        self.line1.draw(window)
        self.line2.draw(window)

    def newSpot(self, window):
        self.line1.undraw()
        self.line2.undraw()
        self.placeSpot()
        self.line1 = Line(self.p2, self.p3)
        self.line2 = Line(self.p4, self.p5)

        self.line1.draw(window)
        self.line2.draw(window)


    def placeSpot(self):
        p1 = Point(randint(1,9), randint(1,8))
        self.p2, self.p3 = p1.clone(), p1.clone()
        self.p2.move(-.3, -.3)
        self.p3.move(.3, .3)
        self.p4, self.p5 = p1.clone(), p1.clone()
        self.p4.move(-.3, .3)
        self.p5.move(.3, -.3)
</code></pre>