this is a small program i wrote. it has 2 dice that go from 1 to 12 if you would like another program with only 1 die or the dice only go from 1 to 6 anything like that feel free to email me or just change it yourself(if u can)
email:shogundrew@hotmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import random
min=1
max=12
roll_again = 'yes'
die1=random.randint(min,max)
die2=random.randint(min,max)
while roll_again == 'yes' or roll_again == 'y':
die1=random.randint(min,max)
die2=random.randint(min,max)
print ('shake, shake, shake!')
print ('you got a:')
print die1
print die2
print ('the sum of your two numbers are below:')
print die1 + die2
roll_again = raw_input ('roll the dice again')
|
this is useful if you dont have any dice? i guess mostly just for fun
Tags: dice