Question: I'm trying to modify this logo so that it moves in response to events. I have to use a 2 key press events, and two

I'm trying to modify this logo so that it moves in response to events. I have to use a 2 key press events, and two mouse click events.

import turtle screen = turtle.Screen() # background color screen.bgcolor("lightblue") # turtle object y = turtle.Turtle() # define function # for drawing rays of Sun def drawFourRays(t, length, radius): for i in range(4): t.penup() t.forward(radius) t.pendown() t.forward(length) t.penup() t.backward(length + radius) t.left(90) # Draw circle # to make sun y.penup() y.goto(85, 110) y.fillcolor("yellow") y.pendown() y.begin_fill() y.circle(45) y.end_fill() #Sun rays y.penup() y.goto(85, 169) y.pendown() drawFourRays(y, 85, 54) y.right(45) drawFourRays(y, 85, 54) y.left(45)

turtle. color('red') style = ('Arial', 30, 'italic') turtle. write("Sammy's makes fun in the sun", font=style, align='center') turtle. hideturtle() # To keep the # output window active turtle.done()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!