Chronology | Current Month | Current Thread | Current Date |
[Year List] [Month List (current year)] | [Date Index] [Thread Index] | [Thread Prev] [Thread Next] | [Date Prev] [Date Next] |
Thanks, Curt.
But when I repeat what you wrote, I get:
Traceback (most recent call last):
File "<stdin>", line q in <module>
AttributeError: 'module' object has no attribute 'rand'
"Trust me. I have a lot of experience at this."
General Custer's unremembered message to his men,
just before leading them into the Little Big Horn Valley
On Wed, 12 Aug 2009, curtis osterhoudt wrote:
Hi, Jack._______________________________________________
Welcome to The Way :) Try:
>>> import random
>>> a_random_number = random.rand()
/************************************
Down with categorical imperative!
flutzpah@yahoo.com
************************************/
________________________________
From: Jack Uretsky <jlu@hep.anl.gov>
To: Forum for Physics Educators <phys-l@carnot.physics.buffalo.edu>
Sent: Wednesday, August 12, 2009 10:16:29 PM
Subject: [Phys-l] random numbers
Hi all-
I'm about to write my first program in python. What's the command
for a random number from a uniform [0,1] distribution? I'm running on a
Mac under OS X 10.5.7
Regards,
Jack
"Trust me. I have a lot of experience at this."
General Custer's unremembered message to his men,
just before leading them into the Little Big Horn Valley
_______________________________________________
Forum for Physics Educators
Phys-l@carnot.physics.buffalo.edu
https://carnot.physics.buffalo.edu/mailman/listinfo/phys-l
_______________________________________________
Forum for Physics Educators
Phys-l@carnot.physics.buffalo.edu
https://carnot.physics.buffalo.edu/mailman/listinfo/phys-l
Forum for Physics Educators
Phys-l@carnot.physics.buffalo.edu
https://carnot.physics.buffalo.edu/mailman/listinfo/phys-l