Hello Sub-zero,
SZ>>I really dont understand if random is not a random then what does it means?
Re u try to say :U can not find random numbers with random comman.If i can't find random numbers with random command , how can i find random numbers?Then what the random command do?I really don't understan <<
Ok, a computer can *never* really pick a random number... But there are certain "algorithems"<sp> that give a "apparent" random number. Lets take a example ok???
Lets Look at PI. PI does not have any "repeating" sequences. Thus, we can say the numbers look random. Every time we turn on our computer and say Pick a Random number, it will pick (lets say) the first digit. The next time we call "Random" it will pick the following digit... and so forth... When we turn off our computer and turn it back on, it will start the process all over again... starting with the first digit...second digit... third digit...etc...
But what happens if you do not want this to happen *exactly* the same, every time you turn on your computer??? You put in a "SEED". A very good seed is the "time".
digit = time (in seconds) * the Lookup number.
Thus if time = 5 the first digit is 5 *1 = 5 which means it will look at the 5th digit of PI. The second time it looks it will look at digit #6 etc etc.
Thus if time = 10 the first digit is 10 *1 = 10 which means it will look at the 10th digit of PI. the second time it looks, it will look at digit #11. etc etc.
Thus if time = 160 the first digit is 160 *1 = 160 which means it will look at the 160th digit of PI. the second time it looks, it will look at digit #11. etc etc.
If you notice, the SEED "Time" is *always* varying to *some* degree...Thus when we turn on our computer, the chances that the seed will be the same as before is very slim.
This is a crude example, but I hope it helps..
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks