[Tutor] how to generate random numbers in Python

Xiaoxia Xu xiaoxia at dix.Mines.EDU
Sat Jun 4 05:42:00 CEST 2005


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,


More information about the Tutor mailing list