Hamza Hesham
Posted on May 19, 2020
hello , today we will make a simple dice roll game .
first we will import random , and make two new variables :
minimum = 1
maximum = 6
then we will make a third variable called again and assign it to "yes".
second, we will make a while loop
in while loop we will print a statement "dice is rolling . . ."
then we will make a variable called x and assign it to :
x = random.randint(minimum,maximum)
and print x
after that we will change again to no :
again = "no"
and change it again to an input :
again = input("play again y/n\n")
to allow the player to play again .
the final code will be like :
thanks for reading.
💖 💪 🙅 🚩
Hamza Hesham
Posted on May 19, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.