Created
June 4, 2014 20:23
-
-
Save emre/4c1fc6e38107dad1d1d0 to your computer and use it in GitHub Desktop.
rng
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 | |
sides = ["head", "tail"] | |
results = { | |
"head": 0, | |
"tail": 0, | |
} | |
for i in xrange(1, 1001): | |
side = random.choice(sides) | |
results[side] += 1 | |
print results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment