Skip to content

Instantly share code, notes, and snippets.

View xenic's full-sized avatar

Sam Boyarsky xenic

View GitHub Profile
#!/usr/bin/python3
from math import factorial
def choose(n,k):
return factorial(n) / (factorial(k) * factorial(n-k))
def get_inputs():
trials = int(input("Number of flips: "))
heads_count = int(input("At least of heads: "))
heads_prob = float(input("Percent chance heads: "))
@xenic
xenic / test
Created February 22, 2017 01:24
12345
sdfg
adfb
@xenic
xenic / hangman.py
Created January 18, 2017 00:31
2017_01_17 TIY-Durham Crash Course Hangman
import random
def get_hidden_word():
f = open("/usr/share/dict/words")
word_list = []
for line in f:
word_list.append(line.strip())
return random.choice(word_list)
def draw_board(hw, gl):