Generating a random number
Stephen Boulet
stephen.boulet at motorola.com
Tue Oct 9 15:46:57 EDT 2001
from random import *
print randrange(1,11)
* Notice that you have to put in an 11 to get from 1 to 10
-- Stephen
Ron White wrote:
>
> Will someone please tell me exactly how to generate a random number from 1
> to 10 in Python 2.1.1 running under windows me? I'm beginning to think
> there is something wrong with my installation or I'm just not smart enough
> to understand what I read.
>
> Thank you for any help.
> Ron
>
> --
> Ron White
> Amateur Radio WA0MWW
More information about the Python-list
mailing list