Demo entry 6713996

Lookup Table

   

Submitted by anonymous on Feb 11, 2018 at 02:31
Language: Python 3. Code size: 726 Bytes.

import sys

def getPayouts(mult):
    multPrizeTable = '\
2	100%			\
5	70%	30%		\
10	60%	25%	15%	\
100	60%	25%	15%	\
H	60%	20%	10%	10%     EndOfTable'
#       1       2       3       4
    srchTable = multPrizeTable.split()
    ndx = srchTable.index(mult)
    p = []
    for i in range(ndx + 1, 99):
        if srchTable[i][-1] == '%':
            p.append(srchTable[i])
        else:
            break
    return p


#--------*---------*---------*---------*---------*---------*---------*---------#
while True:#                       M A I N L N E
#--------*---------*---------*---------*---------*---------*---------*---------#
    daPayouts = getPayouts('100')
    print(daPayouts)
    sys.exit()

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).