This is graphics.py from the zelle book. The following code seemed to be working but when i added the parameters to the function def drawEye(win, centre, radius): i get an error when i try to execute it
Traceback (most recent call last):
File "C:\Documents and Settings\Compaq_Owner\Desktop\t.py", line 22, in <module>
drawEye()
TypeError: drawEye() takes exactly 3 arguments (0 given)
>>>
from graphics import *
def drawCircle(win, centre, radius, colour):
circle = Circle(centre, radius)
circle.setFill(colour)
circle.setWidth(2)
circle.draw(win)
def drawEye(win, centre, radius):
w = 250
h = 250
win = GraphWin("One Spooky Eye", w, h)
# center should be at 1/2 width and height
centre = Point(w//2, h//2)
drawCircle(win, centre, 40, "white")
drawCircle(win, centre, 20, "blue")
drawCircle(win, centre, 10, "black")
# click mouse to go on
win.getMouse()
win.close()
drawEye()