Question: 6 . 4 Beach ball Run beachBall = Group ( Polygon ( 2 0 0 , 3 0 0 , 1 5 0 , 2
Beach ball
Run
beachBall Group
Polygon fill'red'
Polygon fill'blue'
Polygon fill green'
Polygon fill 'orange'
Polygon fill'fuchsia'
Polygon slateBlue'
Circle fillgradient white 'black' opacity
beachBall. direction
def onKeyHoldkeys:
# Moves the wave in and out and fade appropriately.
wave. opacity 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 to reverse direction.
### Place Your Code Here ###
shadow. center beachBall. center
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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
