[Tutor] random floats in a range greater than 0.0-1.0

kevin parks kp87@lycos.com
Thu, 14 Feb 2002 00:52:26 +0900


Thanks to all on this list for addressing my queries. I am learning quite a lot these days. I am really giving the interperter a workout during this holiday break (though slowed a bit by a late winter cold today).

I see in the random module that you can get random integers with randrange and you can get 0-1.0 floats, but how does one get floats in a range (of say 0-100, 50-128, or whatever...), do you just use the regular random (0-1) floats and scale the output? Or is it better to look for a way in Numpy?

sorry if this is not so clear... running for a kleenex....

-kevin
seoul, korea





Go Get It!
Send FREE Valentine eCards with Lycos Greetings
http://greetings.lycos.com