/ Published in: Python
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
''' Dice Roller - Generate two pseudo-random numbers @author: chrisaiv ''' import random die1 = random.randrange(6) + 1 die2 = random.randrange(6) + 1 total = die1 + die2 print "You rolled a", die1, "and a", die2, "for a total of ", total