Respuesta :
Answer:
import simplegui
def draw_handler(canvas):
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")
frame = simplegui.create_frame('House', 600, 600)
frame.set_canvas_background("Black")
frame.set_draw_handler(draw_handler)
frame.start()
Sorry this is kinda late but just copy and paste the code above (i got a 100%)
The program is an illustration of the simple GUI framework in Python
The GUI framework is used to model programs that require a graphic user interface
The program in Python where comments are used to explain each line, is as follows:
#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()
Read more about similar programs at:
https://brainly.com/question/19910463