txt, 1.85 KB
txt, 1.85 KB
Computers have a built-in list of random numbers. You can

get the same numbers by setting the computer to a place on this list.
To get real randomness, you have to set the computer to a random place on the list.
The computer keep the time since it was turned on. This is the one thing
that is really random.

So:

N=RND(-4) (You set the computer list with a negative number)

Sets the randomness list to the 4th place. Each time you write
this you get a list with he same numbers.

N=RND(-4) This says set the random list to the 4th place X=1 TO 5 This says go into a loop 5 times Y=RND(10) This says Y is a random number from 1 to 10 PRINT Y This says print the number NEXT X This goes back and does the loop again This program prints out 4 5 8 5 10 every time. However: N=RND(-TIME) This says set the random list to a random place. (The time on the timer.) X=1 TO 5 This says go into a loop 5 times Y=RND(10) This says Y is a random number from 1 to 10 PRINT Y This says print the number NEXT X This goes back and does the loop again Now each time you run the program, you get a different number list. 1 7 5 7 3 2 8 4 1 9 6 5 10 3 7 Putting in a randomizer line is necessary to get real random numbers.

It may be useful to have the same numbers at times; for example in a game
you may want the same numbers coming out for two players on different computers.
You can generate a player’s profile numbers without having to save them with his method too.
I was told, when running a bingo game, the organizers know the numbers called before time
to prevent disputes; they probably used this method.

THE END

Creative Commons "Sharealike"

Reviews

Something went wrong, please try again later.

This resource hasn't been reviewed yet

To ensure quality for our reviews, only customers who have downloaded this resource can review it

Report this resourceto let us know if it violates our terms and conditions.
Our customer service team will review your report and will be in touch.