Computer Science, asked by eduardaadocarmoo05, 5 months ago

6.6 Code Practice: Question 2

Attachments:

Answers

Answered by 22nliang
23

Answer:

import simplegui

def draw_handler(canvas):

   

   canvas.draw_circle((200, 130), 90, 5, "Green")

   canvas.draw_circle((200, 130), 70, 5, "Green")

   canvas.draw_circle((200, 130), 50, 5, "Green")

   canvas.draw_circle((200, 130), 30, 5, "Green")

   canvas.draw_circle((200, 130), 10, 5, "Green")

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

frame.set_canvas_background("White")

frame.set_draw_handler(draw_handler)

frame.start()

Explanation:

i got an 100% on edhesive for this code so it should work

Answered by natipantin
0

Answer:

import simplegui

def draw_handler(canvas):

   canvas.draw_circle((300,300), 20,4,"Blue")

   canvas.draw_circle((300,300), 40,4,"Green")

   canvas.draw_circle((300,300), 60,4,"Orange")

   canvas.draw_circle((300,300), 80,4,"Yellow")

   canvas.draw_circle((300,300), 100,4,"Red")

   canvas.draw_circle((300,300), 120,4,"Pink")

   canvas.draw_circle((300,300), 140,4,"Purple")

   canvas.draw_circle((300,300), 160,4,"Blue")

   canvas.draw_circle((300,300), 180,4,"Brown")

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

frame.set_canvas_background("White")

frame.set_draw_handler(draw_handler)

frame.start()

Explanation:

I added a few cirlces and changed the color of the circles for decoration. If you want them all green, just add the word green.

Similar questions