jeudi 10 juin 2021

How to create a pseudorandom shuffle of a list containing 2 and 1 values whereby 1 values cant appear consecutively

I'd like to create a list that contains 15 values of number 1 and 60 values of number 2 and then I would like the list to be shuffled randomly in a way that there can never be more than one appearance of the value 1 in a row (e.g., it can never be 22212222122112212

Super appreciate any help or directions!




Aucun commentaire:

Enregistrer un commentaire