Solved Why call random.random() exactly once per reading? AMAmeliaRunsOP 3 Oct, 11:36 The task is very specific about it.
FRFreyaL3 Oct, 13:42 Solutionreplies: 2With a seed, the sequence of random numbers is fixed. If you call random() an extra time somewhere, every later number shifts, and you won't get the expected 7 glitches. Same for calling choice() "right after detection" in stage 2.
Comments 4
Join the discussion CommentAlready have an account? Log in
With a seed, the sequence of random numbers is fixed. If you call random() an extra time somewhere, every later number shifts, and you won't get the expected 7 glitches. Same for calling choice() "right after detection" in stage 2.
So the order of random calls is part of the result. Interesting.
Related to the random module article — the seed discussion there.
This is also why reproducible scientific simulations document their seeds.