Skip to content

Instantly share code, notes, and snippets.

@BurnBabyBurn71
Created October 11, 2014 13:30
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 BurnBabyBurn71/19e69e3d7408f341e0db to your computer and use it in GitHub Desktop.
Save BurnBabyBurn71/19e69e3d7408f341e0db to your computer and use it in GitHub Desktop.
Simple dice roller (Python 3)
import random
num = int(201)
rolls = {}
for k in range(2, 13):
rolls[k] = 0
for k in range(num):
first = random.randint(1, 6)
second = random.randint(1, 6)
rolls[first+second]+=1
for k in rolls:
print(k, rolls[k])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment