""" Week4-1 Notes """


###

def drawGrid(canvas, size):
    for row in range(size):
        topSq = 50 * row
        bottomSq = topSq + 50
        if row % 2 == 0:
            color = "blue"
        else:
            color = "purple"
        for col in range(size):
            leftSq = 50 * col
            rightSq = leftSq + 50
            canvas.create_rectangle(leftSq, topSq, rightSq, bottomSq, fill=color)

import tkinter
def runDrawGrid():
    root = tkinter.Tk()
    canvas = tkinter.Canvas(root, width=400,
                            height=400)
    canvas.configure(bd=0,
                     highlightthickness=0)
    canvas.pack()

    drawGrid(canvas, 4) # your call here!

    root.mainloop()

runDrawGrid()