import tkinter as tk def draw(canvas,width,height): canvas.create_rectangle(50,50,200,200,fill="blue") canvas.create_rectangle(150,150,175,175,fill="yellow") canvas.create_rectangle(200,200,275,275,fill="red") def runDrawing(width=300,height=300): root=tk.Tk() canvas=tk.Canvas(root,width=width,height=height) canvas.pack() draw(canvas,width,height) root.mainloop() print("bye")