vendredi 8 décembre 2017

Weight random number towards range

Let's say I'm getting random number in the range using:

random.randrange(100)

Let's say that if it gives a number less than or equal to 25, you win and if it gives a number greater than 25, I win. I would then have a 75% chance to win.

How can I weight the chances of the number being greater than 25 by some percentage, say 1%.

So basically I'm trying to tilt the odds of me winning by another 1%.

Let me know if this is unclear.




Aucun commentaire:

Enregistrer un commentaire