mercredi 15 novembre 2017

python random number - double the chance? [duplicate]

This question already has an answer here:

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