Skip to content

Instantly share code, notes, and snippets.

@Ttech
Created March 13, 2010 04:19
Show Gist options
  • Save Ttech/331100 to your computer and use it in GitHub Desktop.
Save Ttech/331100 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import random
tosses = 100
face = random.randrange(0,10)
heads = 0
tails = 0
for i in range(0,tosses,1):
face = random.randrange(0,10)
if face <= 5:
heads += 1
else:
tails += 1
print "\nheads => ", heads, "\ntails => ", tails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment