WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 04-27-2006, 07:00 PM
Vygreif Vygreif is offline
Join Date: Sep 2005
Posts: 21
Random Seeds

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?

Reply With Quote
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:

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

for i in range(0,100):
print random()
Reply With Quote

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 06:29 PM.

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