A
Andrea Gavana
Hi Michael,
Thanks for your suggestion, but it doesn't matter whether you call
seed() or not. The random number generator can *not* return 10 equal
values if called 10 times, irrespective of the fact that it is
initalized or not. You can try by simply doing:
import random
print random.random()
print random.random()
print random.random()
And you'll see that the numbers are different.
Moreover, I can populate that list by hand with 10 values like:
therand = [ii for ii in xrange(1, 11)]
And the result in Excel will be the same. All the cells will have the value 1.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/
First of all you should call the random.seed()
function. That was at least what I´ve always done.
seed([x])
Thanks for your suggestion, but it doesn't matter whether you call
seed() or not. The random number generator can *not* return 10 equal
values if called 10 times, irrespective of the fact that it is
initalized or not. You can try by simply doing:
import random
print random.random()
print random.random()
print random.random()
And you'll see that the numbers are different.
Moreover, I can populate that list by hand with 10 values like:
therand = [ii for ii in xrange(1, 11)]
And the result in Excel will be the same. All the cells will have the value 1.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/