PythonWin And Excel Problem

A

Andrea Gavana

Hi Michael,
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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,817
Latest member
AdalbertoT

Latest Threads

Top