nishantsule / Coin-Toss-Game

Simulating a coin tossing game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CoinToss

This notebook simulates a coin tossing game where the player gets to pick a string of head/tail occurances as the endgame. A coin is tossed until the chosen sequence of head/tail occurs. When the endgame sequence occurs the game ends. The objective is finding the sequence of head/tail occurances (for a given sequence length) that will be end the game with the least number of tosses. This is simulated by running a given number of coin toss games with the chosen endgame sequence. The avarage number of tosses required to win is computed and its distribution is plotted.

About

Simulating a coin tossing game

License:MIT License


Languages

Language:Jupyter Notebook 84.9%Language:Python 15.1%