6.5 code practice edhesive
Answers
Answer:
import simplegui
import random
def draw_handler(canvas):
# your code goes here
canvas.draw_line((200, 300), (400, 300), 5, "Black")
canvas.draw_line((200, 500), (200, 300), 5, "Black")
canvas.draw_line((400, 500), (400, 300), 5, "Black")
canvas.draw_line((200, 500), (400, 500), 5, "Black")
canvas.draw_line((200, 300), (300, 200), 5, "Black")
canvas.draw_line((400, 300), (300, 200), 5, "Black")
canvas.draw_line((275, 500), (275, 400), 5, "Navajowhite")
canvas.draw_line((325, 500), (325, 400), 5, "Navajowhite")
canvas.draw_line((275, 400), (325, 400), 5, "Navajowhite")
canvas.draw_line((325, 500), (325, 400), 5, "Navajowhite")
canvas.draw_line((220, 280), (220, 175), 5, "Black")
canvas.draw_line((240, 260), (240, 175), 5, "Black")
canvas.draw_line((220, 175), (240, 175), 5, "Black")
frame = simplegui.create_frame('Testing', 600, 600)
frame.set_canvas_background("White")
frame.set_draw_handler(draw_handler)
frame.start()
Explanation:
To anyone who needs it. This is what I did an got a 100%.