NEW
10 FOR X
20 PRINT
30 NEXT
= 1 TO 10(IF YOU LEAVE OUT THE COMMA YOUR LIST
RND(1),-\ OFNUMBERSWILLAPPEAR
AS 1 COLUMN
After running the program, you will see a display like this:
Your numbers don't match? Well, if they did we would all be in
trouble, as they should be completely random!
Tryrunning the program a few more times to verify that the results are
always different. Even if the numbers don't follow any pattern, you
should start to notice that some things remain the same every time the
program is run.
First, the results are always between 0 and 1, but .never equal to 0 or
1. This will certainly never do if we want to simulate the random toss of
dice, since we're looking for numbers between 1 and 6.
The other important feature to look for is that we are dealing with real
numbers (with decimal places). This could also be a problem since
whole (integer) numbers are often needed.
There are a number of simple ways to produce numbers from the
RND function in the range desired.
Replace line 20 with the following and run the program again:
49