Okay, so if you want to know, there's a function in computer programming called RND().
This function includes a mathematical equation that tells the computer on how to pick a random number. Because well.....a computer simply cannot be random on it's own.
Now, if I'm correct, I believe the equation is:
X = (Number of seconds since Jan. 1 / Number of milliseconds since the past minute)
X = X / 100
This will give you some kind of percentage number, like 0.45 or 0.087 for example.
Though I'm not sure. I haven't had to program a randomizing function in a long time, but it's something along those lines. I do remember the number of milliseconds being somewhere in the equation because that's what makes the computer's selection appear random.
The function RND() must be supplied with two numbers to work. The first number is the low threshold, or the lowest possible option. The second number is the high threshold, or the highest possible option. For example, picking a random number between 1 and 10, the low threshold is 1 and the high threshold is 10.
Next, RND() will subtract the low threshold from the high threshold, then add 1. It now has the number of available options to choose from. It will multiply this number by the percentage number it got from the previous equation. The computer has now made somewhat of a random selection (Remember I say somewhat....computers cannot be random.).
All it does now is add the selection to the low threshold and subtract 1 (it does this because the low threshold itself is counted as one of the available options). There's your final answer.
Now, to the reason that some of the answers repeat. Remember that the RND() function uses the number of milliseconds since the past minute. Meaning that each minute, that part will reset to 0 (and no, the function will never allow division by zero. There's a simple if statement programmed in there to keep that from happening.). Also, this function can only return a whole number. Meaning that is has to either round up or round down. So realistically, EACH selection is different but since the computer has to round up or round down to give an even whole number, some options repeat more than others.
*Sigh*
I've never had to explain the RND() function to non-programmers before, so I hope that this helps. Any other questions, feel free to PM me.