Skip to content

Instantly share code, notes, and snippets.

@bulislaw
Last active May 6, 2020 18:50
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 bulislaw/459caaf4d4079b84d70f64c717c8deff to your computer and use it in GitHub Desktop.
Save bulislaw/459caaf4d4079b84d70f64c717c8deff to your computer and use it in GitHub Desktop.
import random
counter=0
heads = 0
while counter < 100:
counter+=1
counting = random.randint(1, 2)
if counting == 1:
heads += 1
print('done heads {} tails {}'.format(heads, counter - heads))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment