Python Forum

Full Version: Scaling random numbers within specific range
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How would one scale some random numbers within a specific range in Python, say [0,pi]? Would simply fmod(random_number/pi) do it?
If you have random numbers on a range (0, 1), multiplying them by n puts them on a range from (0, n).
Say the random numbers are not explicitly given, i.e. we don't know in which interval they're in. How would one work around that?
Generate a bunch of them and estimate the interval?
Depends on the application. Can you get all the random numbers into a list and then see the min and max? I take it you are not generating the random numbers but receiving them for analysis?