"""
Learning Goals
 - Trace the call stack to understand how Python keeps track of nested function calls
 - Use libraries to import functions in categories like math, randomness, and graphics
 - Recognize that the process of tokenizing, parsing, and translating converts Python code into instructions a computer can execute
 - Recognize how the different types of errors are raised at different points in the Python translation process
"""

def outer(x):
    y = x / 2
    return inner(y) + 3

def inner(x):
    y = x + 1
    return y

print(outer(4))

###

import math

print(math.ceil(6.2))

import random

print(random.randint(1, 10))

import tkinter as tk # shorten library name

# You write code in here!
def draw(canvas):
    canvas.create_rectangle(40, 40, 80, 140, fill="red")
    canvas.create_rectangle(30, 80, 150, 200, fill="green")
    canvas.create_rectangle(90, 70, 180, 120, fill="blue")

def makeCanvas(w, h):
    root = tk.Tk()
    canvas = tk.Canvas(root, width=w,
                       height=h)
    canvas.configure(bd=0,
                     highlightthickness=0)
    canvas.pack()

    draw(canvas) # call your code here

    root.mainloop()

makeCanvas(400, 400)
