Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 '
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

Human social life is complex.

Answered: 1 week ago

Question

6. How do histories influence the process of identity formation?

Answered: 1 week ago