[Tutor] how to generate random numbers in Python
ajikoe at gmail.com
Sat Jun 4 23:43:38 CEST 2005
Don't forget to call : import random
On 6/4/05, Xiaoxia Xu <xiaoxia at dix.mines.edu> wrote:
> I tried to use a Python library module random() to generate some
> noise to my data. But the interpreter gave me an error
> message saying NameError: name 'random' is not defined.
> I thought this error is because I don't have the pertinent
> library included. Could anyone tell me how can I get this
> to work?
> Many thanks,
> Tutor maillist - Tutor at python.org
More information about the Tutor