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]

Re: [Phys-l] random numbers



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