-
-
Save BurnBabyBurn71/19e69e3d7408f341e0db to your computer and use it in GitHub Desktop.
Simple dice roller (Python 3)
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
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