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 |
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