for num in range(10):
    print(num+1)
    
print("done!")

x = 0
for i in range(20):
    x = i - x
print(x)

print("Done!")

for d in range(10, 0, -1):
    print(d)
    
print("done again")

s = ""
for g in range(10, 14):
    s = s + str(g) + "-"
print(s)

def isPrime(x):
    # we won't consider negative numbers,
    #   and 0 and 1 are defined to be non-prime.
    # Handle these in a special case before the loop!
    if x < 2:
        return False
    
    for factor in range(2, x):
        print(factor)
        if x % factor == 0:
            return False
    return True
    
### Graphics with function definitions ###

import tkinter as tk # shorten library name

def drawGrid(canvas, gridSize):
    for row in range(gridSize):
        for col in range(gridSize):
          topX = col * 50
          bottomX = topX + 50
          topY = row * 50
          bottomY = topY + 50
          canvas.create_rectangle(topX, 
                                topY,
                                bottomX,
                                bottomY)

def makeCanvas(w, h):
    root = tk.Tk()
    canvas = tk.Canvas(root, width=w, height=h)
    canvas.configure(bd=0,
                     highlightthickness=0)
    canvas.pack()
    # code to call grid function
    drawGrid(canvas,4)
    root.mainloop()

makeCanvas(400, 400)
