mardi 15 janvier 2019

will randint always generate random numbers?

Does random.randint have a cooldown (or so) time before it generates a new random/seed?

As a part of something bigger I am trying to program a list of 5 "dice rolls" (random numbers from 1 to 6). I have this code in my program:

from random import randint

rolls = [randint(1,6),randint(1,6),randint(1,6),randint(1,6),randint(1,6)]
print (rolls)

When checking things i rolled 1,2,3,4,5 twice in a row and then i checked other rolls and the numbers didnt seem to change much between each roll




Aucun commentaire:

Enregistrer un commentaire