Created
January 9, 2012 23:37
-
-
Save arruda/1585687 to your computer and use it in GitHub Desktop.
roll.py
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
# -*- coding: utf-8 -*- | |
import random | |
def roll(sides=6,rolls=1): | |
results=[] | |
for r in range(rolls): | |
res = random.randint(1,sides) | |
print res | |
results.append(res) | |
return results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment