WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Random Seeds (https://forum.worldviz.com/showthread.php?t=563)

Vygreif 04-27-2006 07:00 PM

Random Seeds
 
Hi,
I want to make a program that uses the same random numbers every time it runs. Will putting random.seed(10) at the beginning of the program and generating random numbers using random.randrange accomplish that?

Thanks,
YG

tobin 04-27-2006 09:21 PM

It should, but it'd really be easy for you to test this yourself by looking at the output of:

random.seed(10)
for i in range(0,100):
print random()

random.seed(10)
for i in range(0,100):
print random()


All times are GMT -7. The time now is 07:25 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC