Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random, sys
- yes = 'y'
- no = 'n'
- print 'Hello, welcome to a simple dice simulator I made to test out Sublime Text Editor'
- option = raw_input('Would you like to roll a die? Y/N \n')
- if option == yes:
- diceroll = random.randint(1,6)
- print 'The die rolled: ' +str(diceroll)
- raw_input = ()
- sys.exit(0)
- elif option == no :
- raw_input = ('Press any key to close this program')
- sys.exit(0)
- else:
- print 'Sorry that is not a valid entry'
- raw_input = ()
- sys.exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement