Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def slots_survival_probability(start_balance, n_spins, n_simulations):
- """Return the approximate probability (as a number between 0 and 1) that we can complete the
- given number of spins of the slot machine before running out of money, assuming we start
- with the given balance. Estimate the probability by running the scenario the specified number of times.
- >>> slots_survival_probability(10.00, 10, 1000)
- 1.0
- >>> slots_survival_probability(1.00, 2, 1000)
- .25
- """
- pass
- q5.check()
Add Comment
Please, Sign In to add comment