Lets say I 30 numbers
I need to assign them random but with drop chances
Ex: There's 2% for number 1, 1.5% for number 2, 1.1% for number 3, 1.7% for number 4 etc...
I'm genereting random numbers with this
from random import randint import string import random
print(randint(1,30)) // generates random number from 1 to 30
But need to assign probability for every number
I don't mind manually assigning percentage to every number
Just need to know how to assign percentage to a random number
Aucun commentaire:
Enregistrer un commentaire