Can someone help me with this code.. I get an error when I try to execute it

from graphics import *
 
def main():
    colour = raw_input("Enter the colour: ")
    win = GraphWin("Patch", 200, 200)
    drawCircle(win, 50, 50, colour)

def drawCircle(win, x, y, colour):
    for i in range(5):
        for j in range(5):
            if (i + j) % 2 == 0:
                topLeftX = x + i * 20
                topLeftY = y + j * 20
                circle = Circle(Point(topLeftX, topLeftY),
                                      Point(topLeftX + 20, topLeftY + 20))
                circle.setFill(colour)
                circle.draw(win)
                
main()

Edited 6 Years Ago by gangster88: n/a

What error do you get?

Traceback (most recent call last):
File "C:/Documents and Settings/Compaq_Owner/Desktop/0", line 19, in <module>
main()
File "C:/Documents and Settings/Compaq_Owner/Desktop/0", line 6, in main
drawCircle(win, 50, 50, colour)
File "C:/Documents and Settings/Compaq_Owner/Desktop/0", line 15, in drawCircle
Point(topLeftX + 20, topLeftY + 20))
File "C:\Python26\lib\site-packages\graphics.py", line 611, in __init__
p1 = Point(center.x-radius, center.y-radius)
TypeError: unsupported operand type(s) for -: 'int' and 'instance'

This question has already been answered. Start a new discussion instead.