Respuesta :

Answer:

#This imports the simplegui module

import simplegui

#This defines the draw_handler function

def draw_handler(canvas):

  #The next five lines draws the boundaries of the polygon, in white

  canvas.draw_polygon([(300, 400), (550, 400), (550, 550), (300, 550)], 2, "White")

  canvas.draw_polygon([(275, 400), (425, 300), (575, 400)], 2, "White")

  canvas.draw_polygon([(400, 475), (400, 550), (450, 550), (450, 475)], 2, "White")

  canvas.draw_polygon([(325, 450), (325, 500), (375, 500), (375, 450)], 4, "White")

  canvas.draw_polygon([(525, 450), (525, 500), (475, 500), (475, 450)], 4, "White")

#The main method begins here

#This creates the frame of the polygon

frame = simplegui.create_frame('House', 600, 600)

#This sets the background as black

frame.set_canvas_background("Black")

#This calls the draw_handler method

frame.set_draw_handler(draw_handler)

#This starts the frame

frame.start()

Explanation:

works for question 1 and 2! your welcome

ACCESS MORE
EDU ACCESS