Welcome to Westonci.ca, where curiosity meets expertise. Ask any question and receive fast, accurate answers from our knowledgeable community. Connect with professionals ready to provide precise answers to your questions on our comprehensive Q&A platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.
Sagot :
Answer:
import simplegui
def draw_handler(canvas):
frame = simplegui.create_frame('Testing', 600, 600)
frame.set_canvas_background("Black")
frame.set_draw_handler(draw_handler)
frame.start()
Explanation:
Answer:
import simplegui
x = 50
y = 200
def draw_handler(canvas):
global x
global y
color = "RGB(15, 150, 150)"
RED = "RGB(150,0,0"
BLUE ="RGB(0,20,200"
x = x + 20
if (x >= 1000):
x = 50
canvas.draw_circle((x, y), 50, 1, color, color)
canvas.draw_circle((x, y+20), 50, 1, RED, RED)
canvas.draw_circle((x, y+50), 50, 1, BLUE, BLUE)
canvas.draw_line((x, y), (x+50, y+200), 5, "Red")
canvas.draw_line((x, y), (x+20, y+200), 5, "Green")
canvas.draw_line((x, y), (x-20, y+500), 5, "White")
frame = simplegui.create_frame("Go", 1000, 400)
frame.set_draw_handler(draw_handler)
frame.start()
Explanation:
your welcome
We hope our answers were helpful. Return anytime for more information and answers to any other questions you may have. Thank you for visiting. Our goal is to provide the most accurate answers for all your informational needs. Come back soon. Thank you for choosing Westonci.ca as your information source. We look forward to your next visit.