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
| #!/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: ")) |
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
| 12345 | |
| sdfg | |
| adfb |
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 | |
| 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): |