Skip to content

Instantly share code, notes, and snippets.

@trevorknight
trevorknight / roulette_sim.py
Last active December 19, 2015 20:16
If you play roulette and always bet on red and your strategy is to always bet $1 unless you lose in which case you double your previous bet.
import random
NUMBER_OF_SIMULATIONS = 1000
STARTING_BANK_BALANCE = 1000
ODDS_OF_LOSS = 20.0/38.0
NUMBER_OF_PLAYS = 180
bankrupt_results = dict()
successful_results = []

Keybase proof

I hereby claim:

  • I am trevorknight on github.
  • I am trevorknight (https://keybase.io/trevorknight) on keybase.
  • I have a public key whose fingerprint is F3B6 6731 0CD5 D393 4C8B 86AF DF15 151E F3C4 D76B

To claim this, I am signing this object: