Guest User

Untitled

a guest
Jun 17th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. def slots_survival_probability(start_balance, n_spins, n_simulations):
  2. """Return the approximate probability (as a number between 0 and 1) that we can complete the
  3. given number of spins of the slot machine before running out of money, assuming we start
  4. with the given balance. Estimate the probability by running the scenario the specified number of times.
  5.  
  6. >>> slots_survival_probability(10.00, 10, 1000)
  7. 1.0
  8. >>> slots_survival_probability(1.00, 2, 1000)
  9. .25
  10. """
  11. pass
  12.  
  13. q5.check()
Add Comment
Please, Sign In to add comment