54.7k views
3 votes
6.5 Code Practice: Question 1 please help with code!!! Thank you

1 Answer

3 votes

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 this from a person named

06desgar99301

If this doesn't work i'm sorry i'll try to find another answer that can help you

User Dperish
by
4.9k points