jeudi 18 février 2016

Random range but can be repeated n amount of time

Random range in ruby presented as

rand(2..11)

Lets say I would love number 2 or any other number in the range to be repeated not more than N amount of times.

Is the way to do it?




Aucun commentaire:

Enregistrer un commentaire