get a random number in python
to sample from the uniform distribution between 0 and 1, you need to import the random module. then, simply call the random method:
>>> import random;
>>> rand_num = random.random()
My blog has moved! Redirecting...
You should be automatically redirected. If not, visit http://stinkpot.afraid.org:8080/tricks/ and update your bookmarks.
0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home