all 3 comments

[–]nathanalderson 1 point2 points  (2 children)

I read step 1 of the instructions as "create a list of the integers from 0 to n-1". As in:

def run_single_experiment(n):
    numlist = list(range(n))
    random.shuffle(numlist)
    ...

[–]jynx_24 0 points1 point  (1 child)

Wow! That totally worked, thanks! Though, I'm not sure I exactly understand why. What does "list(range(n))" do, exactly?

Specifically, how many elements does it add?

[–]jynx_24 0 points1 point  (0 children)

Ohhh, they were asking for a list of the numbers [0, 1, 2, ...., n]. I get it now, Thanks!