Lesson goal: Make it snow

Previous: Numbers ending in 1 | Home | Next: Graph a line in slope-intercept form

One of the classic graphics jobs is to make it "snow" on the screen. This is done with a for loop counting to around 100 or 1000 or so, then plotting a dot at a random position on the screen each time. Review how to find a random number before proceeding, in case you forgot.

Now you try. Try fixing the for statement to do a proper count from 1 to some number, then fix the math.random statements.

Type your code here:


See your results here: