Created
February 4, 2018 21:22
-
-
Save xslendix/f012eeab80d5f53e936ba1e4602e08e3 to your computer and use it in GitHub Desktop.
A simple dice rolling program made in Python 3.6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint | |
from time import sleep | |
dicenum = randint(1, 6) | |
print("Rolling dice...") | |
print("") | |
print(" _______ \n /\ \ \n /()\ () \ \n/ \_______\ \n\ /() / \n \()/ () / \n \/_____()/") | |
print("") | |
sleep(1) | |
if dicenum == 1: | |
print(" _______\n| |\n| . |\n| |\n|_______|") | |
elif dicenum == 2: | |
print(" _______\n| . |\n| |\n| . |\n|_______|\n") | |
elif dicenum == 3: | |
print(" _______\n| . |\n| . |\n| . |\n|_______|\n") | |
elif dicenum == 4: | |
print(" _______\n| . . |\n| |\n| . . |\n|_______|\n") | |
elif dicenum == 5: | |
print(" _______\n| . . |\n| . |\n| . . |\n|_______|\n") | |
elif dicenum == 6: | |
print(" _______\n| . . |\n| . . |\n| . . |\n|_______|\n") | |
print("\nThe number is: " + str(dicenum)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment