PythonWin And Excel Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrea Gavana

    #1

    PythonWin And Excel Problem

    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 value1.

    Andrea.

    "Imaginatio n Is The Only Weapon In The War Against Reality."

Working...