i = 0
x = 0
ranNum=[]
while x <= 5:
while i <= 5:
ranNum.append(random.randint(1,5))
i+=1
print(ranNum)
print(sum(ranNum)/len(ranNum),'\n')
random.seed(10)
x+=1
Hi I am currently playing around with while loops and ranNumber generator in python
But the 6 arrays I get all have the same numbers.
Ideally I would want a batch of 6 numbers each per array.
Aucun commentaire:
Enregistrer un commentaire