Question: 6 . 4 Beach ball Run beachBall = Group ( Polygon ( 2 0 0 , 3 0 0 , 1 5 0 , 2

6.4 Beach ball
Run
beachBall = Group (
Polygon(200,300,150,250,200,225, fill='red'),
Polygon(200,300,200,225,250,250, fill='blue')
Polygon , fill =?' green' '),
Polygon , fill = 'orange' ),
Polygon(200,300,150,350,125,300, fill='fuchsia'),
Polygon(150,250,200,300,125,300,fill'=?' slateBlue' ?',
Circle(200,300,68, fill=gradient ('white', 'black'), opacity=15)
beachBall. direction =1
def onKeyHold(keys):
# Moves the wave in and out and fade appropriately.
wave. opacity +=2** beachBall.direction
wave. height += beachBall. direction
# The ball should rotate and roll until it reaches the end of the canvas
# at which point it should reverse direction.
### (HINT: Use beachBall. direction to move and rotate in the correct
# direction. Then multiply it by -1 to reverse direction.)
### Place Your Code Here ###
38 shadow. center x= beachBall. center x
Checklist
Hold down any key and notice how the beach ball rolls and the waves fade in and out.
# Press on any key once.
onKeyHold([' space '
 6.4 Beach ball Run beachBall = Group ( Polygon(200,300,150,250,200,225, fill='red'), Polygon(200,300,200,225,250,250,

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 Databases Questions!