a)In this case does the random number generator uses the system’s clock (making the seed change) on each run?
b)Is the seed used to generate the pseudo-random values of expovariate(lambda)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
“Use the Source, Luke!”…;-). Studying https://svn.python.org/projects/python/trunk/Lib/random.py will rapidly reassure you;-).
What happens when seed isn’t set (that’s the “i is None” case):
and the expovariate:
obviously uses the same underlying random generator as every other method, and so is identically affected by the seeding or lack thereof (really, how else would it have been done?-)