def ex_15_4_1(canvas): box = Rectangle() box.width = 300 box.height = 200 box.corner = Point() box.corner.x = -150 box.corner.y = -100 box.color = 'green4' draw_rect(canvas, box) pt = Point() pt.x = -25 pt.y = 0 draw_point(canvas, pt)
def create_point(x, y): pt = Point() pt.x = x pt.y = y return pt