Skip to content

Instantly share code, notes, and snippets.

@moocowmoo
Last active January 3, 2017 23:20
Show Gist options
  • Save moocowmoo/789f9e2e2bdddf0708a5d200f5c09c12 to your computer and use it in GitHub Desktop.
Save moocowmoo/789f9e2e2bdddf0708a5d200f5c09c12 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python2
def capture_probability( n_full_set, n_capture_set, rounds):
return (n_capture_set / n_full_set) ** rounds
masternode_count = 4270
if __name__ == "__main__":
for percentage in range (5, 100, 5):
for rounds in range(1,9):
capture_set = masternode_count * float(percentage)/100
print "%s %s %s %.12f " % ( masternode_count, percentage, rounds, capture_probability(masternode_count, capture_set, rounds) * 100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment