Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How do I complete the code?? 7.4 Lava lamp A PEEQBEQ 26 blobs . add (blob) 27 28 newBlobRadius += 5 29 newBlobX += 10

How do I complete the code??

image text in transcribed
7.4 Lava lamp A PEEQBEQ 26 blobs . add (blob) 27 28 newBlobRadius += 5 29 newBlobX += 10 30 newBlobSpeed -= 1 31 32 # Populates the blob group 33 createBlobs( ) 34 35 # 1amp 36 Oval (200, 200, 130, 300, fill-gradient ('yellow, 'red'), opacity=65) 37 Oval (200, 200, 130, 300, fill=None, border='black') 38 Polygon (150, 100, 175, 50, 225, 50, 250, 190, 39 fill-gradient('orange', 'fireBrick', start='left'), border='black') 40 Polygon (150, 300, 175, 350, 225, 350, 250, 300, 41 fill gradient('orange', 'fireBrick', start='left'), border='black' ) 42 Polygon (175, 350, 160, 375, 240, 375, 225, 350, 43 fill-gradient('orange', 'fireBrick', start='left'), border='black' ) 44 45 - def onStep ( ): 46 # Move each blob based off of the speed defined in createBlobs(), 47 # and bounce it when it reaches the bounds of the lamp. 48 ### (HINT: Move each blob separately since they have different speed. ) 49 ### Place Your Code Here ### 50 pass 51 Checklist Run the solution canvas. Notice how blobs move inside # Run for 1 step. the lava lamp and bounce when they reach the bounds of > onStep ( ) the lamp app . paused = True

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

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions