Roll the Dice!

A simple code to roll two dices while playing board games with your friends.

Welcome to the code! Wait… Lost your dices? That’s so sad. But, don’t worry! You can use this code to replace your dices.

In this code, the computer rolls two dices and prints two random numbers just like the dices.

Note: Loved the post? You too can publish your article on “Python for fun” which will be loved by millions. Contribute an article!

					import random
min = 1
max = 6

roll_again = "yes"

while roll_again == "yes" or roll_again == "y":
    print ("Rolling the dices...")
    print ("The values are....")
    print (random.randint(min, max))
    print (random.randint(min, max))

    roll_again = input(("Roll the dices again?"))				
2 1 vote
Notify of
1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
1 year ago

so fun thanks bro