Created
July 31, 2014 05:08
-
-
Save nicovillanueva/57bde4a56e7d6422d8e4 to your computer and use it in GitHub Desktop.
Generates dice throws for D&D (or originally thought for such), and kept me busy for 10 minutes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import random | |
d = raw_input("Using dice: d") | |
a = raw_input("How many die?: ") | |
t = raw_input("How many times?: ") | |
if a == "": a=1 | |
if t == "": t=1 | |
for times in range(int(t)): | |
if t > 1: print "--- Throw " + str(times+1) | |
for amount in range(int(a)): | |
print str(random.randint(1, int(d))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment