Skip to content

Instantly share code, notes, and snippets.

@arruda
Created January 9, 2012 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arruda/1585687 to your computer and use it in GitHub Desktop.
Save arruda/1585687 to your computer and use it in GitHub Desktop.
roll.py
# -*- 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