What’s the purpose of this seed when running this for loop?
import numpy as np
np.random.seed(123)
outcomes = []
for x in range(10):
coin = np.random.randint(0,2)
if coin == 0:
outcomes.append(“heads”)
else:
outcomes.append(“tails”)
print(outcomes)
From what I understand, sees saves the outcome of a random function. Is the seed function only used once in this example? If so, what’s the point of including it? I appreciate the help!