Skip to content

Instantly share code, notes, and snippets.

@xslendix
Created February 4, 2018 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xslendix/f012eeab80d5f53e936ba1e4602e08e3 to your computer and use it in GitHub Desktop.
Save xslendix/f012eeab80d5f53e936ba1e4602e08e3 to your computer and use it in GitHub Desktop.
A simple dice rolling program made in Python 3.6
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