Skip to content

Instantly share code, notes, and snippets.

@lavaboom
Last active July 15, 2019 18:33
Show Gist options
  • Select an option

  • Save lavaboom/8a9dfd0fc2b51a0c6be86173feeb3317 to your computer and use it in GitHub Desktop.

Select an option

Save lavaboom/8a9dfd0fc2b51a0c6be86173feeb3317 to your computer and use it in GitHub Desktop.
[SlotSimUtils] A collection of utils function used in slot sim and probabilities calculation #python #slot #casino
def get_average_stat(times, func, params):
'''
run <func> <times> with given <params> and return the average statistics
'''
tally = 0.0
for i in range(times): tally += func(params)
print('Average stat: {}'.format(tally/times))
return tally/times
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment