Skip to content

Instantly share code, notes, and snippets.

View TheTechRobo's full-sized avatar
🕔
endless procrastination

TheTechRobo

🕔
endless procrastination
View GitHub Profile
@TheTechRobo
TheTechRobo / coin_flip_sim.py
Last active July 27, 2019 19:07 — forked from An-Nguyen1/Coin flip simulator.py
Simulate as many coin flips as your computer can handle
import random
flips = int(input('how many times do you want to flip the coin? '))
outcomes = ['head','tail']
wieghts = [.5,.5]
head=0
tail=0
for flip in range(flips):
h_t = random.choice(outcomes)
if h_t == 'head':
head += 1