eranchetz / coinflip-k12

Python lesson for k12 students

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python 3 Coinflip experiment

Yair had an idea he would like to test, assuming you have a coinflip bet, what is the best strategy to win assuming losing streaks are statiscally uncommon. we decided to test the following:

  • bet on amount X
  • if you lose bet is: X * 2
  • if you don't have enough money bet everything (all in)
  • if you win bet X

How to run

  • Clone this repo
  • run:
python3 coinflip.py <number of time to place a bet>

example:

python3 coinflip.py 100

About

Python lesson for k12 students


Languages

Language:Python 100.0%