jeudi 23 février 2023

How do I manipulate random.randint( ) in Python to give a particular number in the range I defined in the parentheses?

I am creating a dice game for fun, where you roll two dice. To win, you have to get 6 on both die. Now, I have been rolling my game for the past 10 minutes and I am yet to get a win. That's when I realize there is so much possible combinations between two die when rolled at random. This will be incredibly boring to players.

So suppose I want to rig each die to randomly show 6 a little more often, how do I do it?

Please note that I am writing in Python, using the random module.




Aucun commentaire:

Enregistrer un commentaire