>> random.seed() sets the starting number for the generator. Setting the
>> seed to a known value can be important if you want the same sequence of
>> pseudorandom numbers to be generated each time you test/run your
>> program.
>>
> I still can not understand. can you show me an example?
Hi Lin
linda.s schreef:
> I still can not understand. can you show me an example?
> Thanks!
> Linda
Example program:
import random
random.seed(42)
for i in range(10):
print random.random()
At the start of the program, the random number generator is seeded with
42. This could be any number, but t
On 9/2/06, Bob Gailer <[EMAIL PROTECTED]> wrote:
> linda.s wrote:
> > I read something about random.seed() but still confused. i can
> > understand random.random() but it is very hard for me to understand
> > random.seed(0... can anyone explain an example?
> >
> I suggest you read
> http://en.wikip
linda.s wrote:
> I read something about random.seed() but still confused. i can
> understand random.random() but it is very hard for me to understand
> random.seed(0... can anyone explain an example?
>
I suggest you read
http://en.wikipedia.org/wiki/Pseudorandom_number_generator to get the
gis
I read something about random.seed() but still confused. i can
understand random.random() but it is very hard for me to understand
random.seed(0... can anyone explain an example?
Thanks a lot!
Linda
___
Tutor maillist - Tutor@python.org
http://mail.pyth