WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-27-2006, 07:00 PM
Vygreif Vygreif is offline
Member
 
Join Date: Sep 2005
Posts: 21
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
Reply With Quote
  #2  
Old 04-27-2006, 09:21 PM
tobin tobin is offline
WorldViz Team Member
 
Join Date: Feb 2003
Posts: 251
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()
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:03 PM.


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