Return to Snippet

Revision: 17170
at August 26, 2009 00:56 by chrisaiv


Initial Code
'''
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

Initial URL

                                

Initial Description

                                

Initial Title
Python: Generate a random number

Initial Tags
python

Initial Language
Python