Created
August 21, 2014 05:09
-
-
Save ColtonPhillips/6fce84fb3e223ed54ca4 to your computer and use it in GitHub Desktop.
A one in N chance that something happens. Lol. So random.
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 | |
random.seed() | |
def chance(_n): | |
return random.randint(1,_n) == _n | |
a=0 | |
for i in range(10000): | |
if (chance(10)): | |
a=a+1 | |
#~1000 | |
print(a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment