samedi 8 mai 2021

Get random numbers that add up to a certain number [closed]

I am trying to make a music program, and I have assumed that if i were able to get random numbers to add up to 4, (4 beats in a measure) it would make my life a lot easier. I have tried making my own code with math.random, but haven't had any success. Basically I want to be able to get an amount of numbers between 1-4 that add up to 4 by the click of a button. ex. (3,1) (1,1,2)




Aucun commentaire:

Enregistrer un commentaire