Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a question from Khan Academy. I'm not sure how to go about doing some of these requirements. I know how to make a

image text in transcribed

This is a question from Khan Academy. I'm not sure how to go about doing some of these requirements. I know how to make a new drop when the user clicks, but other than that I'm lost. Please help!

1 var Positions [200] 2 var y Positions [0 4 draw function background (204, 247 255); 7 for (var i 0; i xPositions. length it nostroke(); fill (0, 200, 255) ellipse (xPositionsli yPositionsli 10, 10) 10 yPositionsli 5; 11 12 13 14 h; Start over Request Help Restart Save About Documentation Guidelines To make an animation of rain, it's best if we use arrays to keep track of the drops and their different properties. Start with this simple code and build on it to make a cool rain animation. Here are some ideas for what you could do: Add more drops to the arrays. Make it so that the drops start back at the top once they've reached the bottom, using a conditional Make an array of colors, so that every drop is a different color. Make other things rain, like snowflakes (using more shape commands) or avatars (using the image commands). Make it so that when the user clicks, a new drop is added to the array Initialize the arrays using a for loop and random function, at the beginning of the program

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

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago