This question already has an answer here:
- Flawed random number generator? 2 answers
- Random weighted choice 7 answers
- Generate random numbers with a given (numerical) distribution 12 answers
I know that I get a random number [1,6] when I use the following function as follows: random.randint(1,7).
Now I want that number 3 has the double chance to come than the numbers 1, 2, 4, 5 and 6. How can I implement that?
Sorry for my bad English. I hope you understand my question.
Aucun commentaire:
Enregistrer un commentaire