PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Darts Game ODDS Calculator. Used to calculate results
# of the darts game described below.
# GAME RULES:
# You pay a FEE to play. You choose how many darts you want.
# All darts must be thrown until you lose or throw all darts.
# If you ever miss, you lose.
# If you hit, you accumulate the prize money.
# More hits = more money (accumuated) but increasing risk.
# There are 9 balloons in the target, so max 9 darts.
# This script calculates the odds, average payout, and
# the profit to the carnival. Any number of darts
# should yield a profit. This script helps to test
# the prize amounts, entry fee, etc.
# Odds can be tuned by changing prize values or entry fee.
Fee = 10
TargetCnt = 9
PrizeLst = [3,4,10,6,4,5,1,4,5]
TURNDETAIL = False # Print odds data per turn.
############################################
def main():
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run