Click 'Run' to go.

** We will combine the math of finding a random number over a range with a repeat loop to plot random points.** Be sure you understand these two articles:

Run the demo below. More information is below the demo.

Slow
Medium
Fast

Click 'Run' to go.

Click 'Run' to go.

*Here is a basic description of how this program works:*

- Set the value for the variable
**min**. This is the value for the.*minimum x- or y-coordinate* - Set the value for the variable
**max**. This is the value for the.*maximum x- or y-coordinate* - Do the following steps 10 times:
a random x-coordinate between*Calculate***min**and**max**.the variable*Set***x**to this value.a random y-coordinate between*Calculate***min**and**max**.the variable*Set***y**to this value.a point at (*Plot***x**,**y**).

*Following is a flow chart for this program:*

*Here is how the program could look when it is typed out in an imaginary computer language:*

min = -10; max = 10; repeat(10) { x = min + rnd() * (max - min); y = min + rnd() * (max - min); point(x, y); }

*Suggested next article:*

The following article is related to this demo: