An Australian Securities Commission official said the International Lotto Fund collected a total of $7.5 million from about 2,500 investors, or an average of $3,000 from each. If the fund charged no management fee, the average investor's share of the Virginia jackpot would be $10,800, or $540 a year through the year 2011.Even with the idea that the fund managers paid their own way in (doubtful), it would take about 5.5 years until the $3,000 investment broke even, ignoring taxes and whatnot.
#!/usr/bin/python
class Card(object):
def __init__(self, name, matrix):
self.name = name
self.__matrix = tuple(tuple(int(x) for x in row) for row in matrix)
assert len(self.__matrix) == 5, \
"%s: matrix does not have 5 rows." % self.__name
# Check some constraints (mostly to help catch data entry errors).
for i, row in enumerate(self.__matrix):
msg = "%s: row %i " % (self.name, i)
assert len(row) == 5, msg + "does not have 5 numbers."
# Each column is restricted to a subset of the full range.
assert 1 <= row[0] <= 15, msg + "column 0 not in range 01-15."
assert 16 <= row[1] <= 30, msg + "column 1 not in range 16-30."
if i == 2:
assert row[2] == 0, msg + "column 2 not wildcard (0)."
else:
assert 31 <= row[2] <= 45, msg + "column 2 not in range 31-45."
assert 46 <= row[3] <= 60, msg + "column 3 not in range 46-60."
assert 61 <= row[4] <= 75, msg + "column 4 not in range 61-75."
# Check for duplicate numbers.
nums = self.Numbers()
assert len(nums) == len(set(nums)), \
"%s: card has duplicate numbers." % self.name
# Tuple of all 25 numbers.
def Numbers(self):
return sum(self.__matrix, tuple())
# Tuple of 5 rows, each a tuple of 5 numbers.
def Rows(self):
return self.__matrix
# Tuple of 5 columns, each a tuple of 5 numbers. Transpose of rows().
def Columns(self):
return zip(*self.__matrix)
class Ticket(object):
def __init__(self, name, caller, bonus, card0, card1, card2, card3):
assert len(caller) == 25, "%s: caller does not have 25 numbers." % name
assert len(bonus) == 5, "%s: bonus does not have 5 numbers." % name
self.name = name
self.caller = tuple(int(x) for x in caller)
self.bonus = tuple(int(x) for x in bonus)
# Caller numbers are drawn from pool of 01-75.
for num in self.caller:
assert 1 <= num <= 75, \
"%s: caller number not in range 01-75." % name
# Bonus should have one number from each subrange.
for mmin, mmax in [(1,15), (16,30), (31,45), (46,60), (61,75)]:
assert any(mmin <= b <= mmax for b in self.bonus), \
"%s: no bonus number in range %02i-%02i." % (name, mmin, mmax)
# Later tests makes these redundant, but they give more specific error
# messages.
assert len(self.caller) == len(set(self.caller)), \
"%s: caller has duplicates." % name
assert len(self.bonus) == len(set(self.bonus)), \
"%s: bonus has duplicates." % name
self.numberset = set(self.caller + self.bonus)
assert len(self.caller) + len(self.bonus) == len(self.numberset), \
"%s: duplicate number in caller and bonus." % name
# Include 0 so the wildcard will always match.
self.numberset.add(0)
self.cards = (
Card(self.name + ", Card 0", card0),
Card(self.name + ", Card 1", card1),
Card(self.name + ", Card 2", card2),
Card(self.name + ", Card 3", card3))
def Play(self):
# Bitmasks representing positions on the 5x5 card.
# 1<<0 is row 0, column 0 (top left)
# 1<<2 is row 0, column 1
# 1<<24 is row 4, column 4 (bottom right)
diag1 = sum(1 << 6*x for x in range(5)) # top-left to bottom-right
diag2 = sum(1 << 4*x for x in range(1,6)) # top-right to bottom-left
horz = sum(1 << x for x in range(5)) # row 0 (top)
vert = sum(1 << 5*x for x in range(5)) # column 0 (left)
corners = 1<<0 | 1<<4 | 1<<20 | 1<<24 # four corners of the card
# The pink box, different for
# each of the four cards.
box = [
1<<18 | 1<<19 | 1<<23 | 1<<24, # pink box for box 1
1<<2 |1<<3 | 1<<7 | 1<<8, # pink box for box 2
1<<0 | 1<<1 | 1<<5 | 1<<6, # etc.
1<<15 | 1<<16 | 1<<20 | 1<<21 ]
dollars = 0
results = []
for card_i, card in enumerate(self.cards):
# Bitmask records which card positions have matching numbers.
bitmask = sum(1<<i for i, n in enumerate(card.Numbers())
if n in self.numberset)
def win(pattern):
return bitmask & pattern == pattern
if win(diag1 + diag2):
results.append("%s: win X" % card.name)
dollars += [100, 500, 1000, 20000][card_i]
elif win(diag1):
results.append("%s: win line (diag1 [\\])" % card.name)
dollars += [3, 4, 5, 10][card_i]
elif win(diag2):
results.append("%s: win line (diag2 [/])" % card.name)
dollars += [3, 4, 5, 10][card_i]
if win(box[card_i]):
results.append("%s: win box" % card.name)
dollars += [50, 100, 500, 1000][card_i]
if win(corners):
results.append("%s: win corners" % card.name)
dollars += [5, 10, 20, 50][card_i]
for i in range(5):
if win(horz << 5*i):
results.append("%s: win line (horz %i)" % (card.name, i))
dollars += [3, 4, 5, 10][card_i]
if win(vert << i):
results.append("%s: win line (vert %i)" % (card.name, i))
dollars += [3, 4, 5, 10][card_i]
return (dollars, results)
# California Lottery scratcher game 682 "Bingo Boxes"
# Introduced February 2011. Price is $3.
# For photos of ticket and odds, see:
# http://www.calottery.com/Games/Scratchers/3ScratcherGallery/682-BingoBoxes.htm
#
# +-------------------------------------------------+
# | $3 B I N G O |
# | B O X E S |
# |=================================================| \
# | [2D-bar-code] | [13-digit-number] | |
# |_________________________| | |
# | | BONUS | |-- hidden under
# | CALLER 10 62 40 44 09 08 33 | 57 | | opaque coating
# | 17 12 42 20 38 54 02 05 60 | 67 16 | |
# | 56 28 58 72 73 23 64 27 18 | 03 36 | /
# |=================================================|
# | | \
# | CARD 0 CARD 1 | |
# | 06 23 31 47 61 04 24 [40][54] 62 | |
# | 09 28 33 59 74 12 17 [45][59] 64 | |
# | 01 27 ** 58 63 15 16 ** 47 72 | |
# | 08 16 40 [57][65] 03 26 31 56 69 | |-- always visible
# | 14 29 44 [51][69] 13 20 36 60 74 | |
# | | |
# | CARD 2 CARD 3 | |
# | [10][19] 42 57 67 14 16 45 56 73 | |
# | [14][18] 31 56 69 05 29 38 48 74 | |
# | 09 16 ** 54 63 02 19 (**) 50 64 | |
# | 02 26 43 59 62 [08][28] 35\ 47 61 | |
# | 13 24 32 51 73 [06][26] 36 \57 72 | |
# | ^ \ | |
# | [serial-number] | \ | /
# +--|--------------------------|-----------\-------+
# | | \--"FREE" (entered as zero)
# |--also printed on back |
# as a bar code |--pink box, does not vary between tickets
#
# Notes:
# - Of course the "Cards" are actually numbered 1-4, but screw that. We use
# zero-based indexes throughout.
# - I believe this game is printed by Pollard Banknote.
# - Customer-accessible Lotto terminals can identify winning tickets by the
# 2D bar code above the Caller numbers. The bar code appears to be a
# non-standard PDF417 variant. It is hidden under the same opaque latex
# that covers the secret numbers. It might just be another serial number,
# though. Lotto terminals use modems to talk to the servers at Lotto HQ.
#
# Scoring:
# - There is no apparent distinction between the 25 Caller numbers and the
# 5 Bonus numbers. Treat it as a unified pool of 30 numbers.
# - The four cards are completely independent with regard to play and payout.
# - For each number on the Caller and Bonus lists, mark all matching numbers
# on the four cards. Also mark the "FREE" square in the center of each card.
# - Cards with the following patterns win:
# - Line: horizontal, vertical, or diagonal.
# - Corners: the four corners of a card.
# - Box: the four numbers in the pink box.
# - X: both diagonals.
# - Payout varies by pattern and by card:
# Card 0 Card 1 Card 2 Card 3
# Line (free ticket) $4 $5 $10
# Corners 5 10 20 50
# Box 50 100 500 1,000
# X 100 500 1,000 20,000
# - Published odds suggest it is not possible to win multiple patterns on the
# same card (e.g. horizontal line AND the four corners of Card 0). Either
# they avoid printing those combinations or only the higher paying pattern is
# is paid out.
# - Winning multiple prizes on different cards of the same ticket is fine. See
# Ticket 5. The payout is the sum of the prizes won.
#
#
#
# Ticket("Ticket Name",
# [Caller numbers], [Bonus numbers],
# [[Card 0 row 0], [Card 0 row 1], [Card 0 row 2], [Card 0 row 3], [Card 0 row 4]],
# [[Card 1 row 0], [Card 1 row 1], [Card 1 row 2], [Card 1 row 3], [Card 1 row 4]],
# [[Card 2 row 0], [Card 2 row 1], [Card 2 row 2], [Card 2 row 3], [Card 2 row 4]],
# [[Card 3 row 0], [Card 3 row 1], [Card 3 row 2], [Card 3 row 3], [Card 3 row 4]])
#
#
Tickets = [
Ticket("Ticket 0", # This data matches the numbers in the ascii art ticket.
[10,62,40,44,9,8,33,17,12,42,20,38,54,2,5,60,56,28,58,72,73,23,64,27,18],[57,67,16,3,36],
[[ 6,23,31,47,61],[ 9,28,33,59,74],[ 1,27, 0,58,63],[ 8,16,40,57,65],[14,29,44,51,69]],
[[ 4,24,40,54,62],[12,17,45,59,64],[15,16, 0,47,72],[ 3,26,31,56,69],[13,20,36,60,74]],
[[10,19,42,57,67],[14,18,31,56,69],[ 9,16, 0,54,63],[ 2,26,43,59,62],[13,24,32,51,73]],
[[14,16,45,56,73],[ 5,29,38,48,74],[ 2,19, 0,50,64],[ 8,28,35,47,61],[ 6,26,36,57,72]]),
Ticket("Ticket 1",
[13,39,34,42,61,27,54,46,26,23,1,30,59,9,10,32,4,64,41,17,48,35,71,65,56],[45,28,5,58,66],
[[ 2,24,42,47,71],[10,27,31,46,70],[11,20, 0,54,64],[ 5,29,34,51,67],[ 6,30,33,48,66]],
[[11,23,39,54,65],[15,17,35,51,64],[ 5,19, 0,56,71],[14,28,44,60,61],[10,26,43,49,70]],
[[ 1,24,45,46,62],[ 4,19,37,51,66],[15,28, 0,59,74],[10,29,43,48,61],[11,18,32,60,70]],
[[ 1,26,41,49,67],[ 2,20,43,46,70],[13,19, 0,58,64],[ 4,27,37,47,73],[ 9,24,31,50,66]]),
Ticket("Ticket 2",
[ 53,45,41,67,31,21,11,63,39,51,12,8,20,25,26,74,32,27,71,55,3,58,54,16,43],[15,64,35,19,57],
[[ 1,16,45,55,70],[ 2,21,34,48,63],[11,18,0,52,74],[13,19,31,54,62],[ 8,24,44,53,68]],
[[14,16,32,56,68],[11,23,34,48,64],[ 3,20,0,51,72],[ 1,24,41,60,70],[ 4,26,40,53,73]],
[[ 3,23,35,52,71],[12,17,34,60,74],[ 2,21,0,58,73],[14,25,38,51,67],[ 1,27,39,56,68]],
[[ 2,18,44,57,74],[11,30,37,52,68],[ 6,20,0,60,67],[15,26,43,55,70],[ 4,23,34,56,71]]),
Ticket("Ticket 3",
[ 24,61,3,30,48,35,8,43,72,16,13,69,38,33,55,42,12,49,5,75,73,62,47,27,58],[31,6,22,66,51],
[[11,24,45,60,65],[12,16,36,54,74],[ 6,22,0,53,67],[ 3,30,31,47,68],[15,23,34,51,64]],
[[ 8,30,34,55,75],[15,27,45,58,64],[ 5,16,0,49,67],[11,19,41,47,66],[ 3,24,38,59,70]],
[[ 9,24,31,48,69],[11,17,36,59,71],[ 1,30,0,54,61],[ 6,28,42,55,72],[15,16,45,53,73]],
[[ 5,21,35,49,75],[15,16,33,54,65],[12,18,0,58,62],[ 8,24,43,59,69],[13,17,36,51,64]]),
Ticket("Ticket 4",
[ 18,75,45,15,59,47,8,54,14,5,25,52,34,4,67,42,60,61,40,29,66,64,51,16,65],[ 7,30,72,50,39],
[[15,16,33,46,72],[12,23,40,50,74],[ 5,25,0,58,68],[14,22,44,48,61],[11,18,34,52,63]],
[[12,25,42,58,67],[ 3,16,39,51,72],[ 2,21,0,48,65],[ 8,27,36,57,74],[ 6,30,31,46,75]],
[[ 8,17,33,59,72],[ 2,30,43,52,66],[11,25,0,54,71],[ 7,21,39,57,64],[ 6,29,45,58,68]],
[[14,29,36,46,63],[ 1,18,39,60,75],[12,16,0,47,66],[ 7,23,35,54,64],[ 4,25,33,59,74]]),
Ticket("Ticket 5",
[ 39,71,43,58,50,11,19,32,61,68,9,47,26,25,49,38,7,28,52,6,75,31,64,63,59],[17,57,62,33,1],
[[ 5,24,41,50,75],[ 1,18,36,46,64],[11,22,0,52,68],[ 4,27,32,58,69],[ 8,30,31,53,65]],
[[ 5,17,36,54,62],[ 8,27,41,59,67],[11,25,0,58,71],[ 1,20,43,52,70],[ 2,18,37,60,72]],
[[ 1,19,33,57,61],[ 2,20,35,50,72],[ 5,18,0,51,67],[ 4,24,44,49,70],[ 9,26,37,53,69]],
[[ 9,19,38,49,69],[11,20,39,53,63],[ 6,26,0,47,67],[ 7,28,44,46,65],[ 4,24,41,57,62]]),
Ticket("Ticket 6",
[ 43,13,31,41,47,61,66,37,69,35,52,57,53,24,56,12,21,65,11,48,9,27,7,19,28],[44,14,50,17,75],
[[ 2,28,41,53,75],[ 9,24,43,58,68],[ 3,26,0,57,70],[ 6,27,45,55,66],[15,19,40,46,63]],
[[14,21,44,50,61],[ 7,26,45,56,62],[11,17,0,48,63],[12,23,34,54,70],[ 2,30,32,47,69]],
[[ 2,19,40,60,69],[11,28,35,58,70],[ 6,26,0,52,62],[ 7,30,42,49,63],[ 4,18,31,46,67]],
[[ 9,18,44,52,65],[12,26,40,60,70],[13,30,0,49,63],[ 7,17,37,46,62],[15,23,35,55,69]]),
Ticket("Ticket 7",
[ 2,8,20,29,1,15,50,46,31,52,36,26,54,74,40,67,72,30,42,59,13,25,55,35,69],[56,16,61,45,10],
[[13,16,32,47,72],[ 9,21,35,55,65],[ 7,28,0,58,73],[ 1,27,37,57,66],[14,26,33,56,68]],
[[11,28,31,46,73],[13,21,34,53,69],[15,16,0,55,68],[ 2,22,33,50,61],[ 7,27,40,54,66]],
[[ 8,16,36,46,68],[ 5,30,39,54,66],[ 9,20,0,52,67],[15,22,38,60,69],[ 7,27,45,49,74]],
[[ 5,28,31,47,67],[10,21,42,57,74],[ 7,27,0,59,68],[11,25,36,60,69],[ 8,29,38,56,72]]),
Ticket("Ticket 8",
[ 75,30,33,49,28,6,74,15,29,58,19,69,16,10,2,45,13,47,36,71,52,8,56,39,46],[53,61,7,23,40],
[[15,30,36,48,73],[ 1,21,40,53,61],[10,26,0,57,69],[ 8,25,33,60,72],[13,18,42,51,65]],
[[ 9,24,45,57,75],[ 2,23,43,55,71],[ 1,29,0,56,73],[ 6,28,38,60,70],[ 4,25,40,58,74]],
[[12,16,45,57,61],[ 7,21,39,55,74],[ 9,19,0,52,65],[ 4,24,41,51,68],[ 1,23,43,47,69]],
[[ 1,23,34,49,69],[15,25,40,57,61],[ 9,18,0,53,73],[ 7,26,33,46,67],[ 4,29,42,55,71]]),
Ticket("Ticket 9",
[ 11,63,46,50,14,21,3,24,39,1,61,4,23,34,73,64,59,70,75,12,44,36,29,47,60],[13,16,71,52,38],
[[ 4,22,34,50,64],[ 8,16,44,54,72],[ 7,27,0,55,61],[15,24,40,46,67],[ 3,25,35,59,62]],
[[ 2,16,35,46,67],[12,27,45,60,71],[ 8,29,0,49,75],[ 4,21,36,51,65],[15,18,38,52,70]],
[[ 2,25,41,55,67],[13,22,39,47,63],[ 7,21,0,51,70],[ 4,27,45,52,68],[12,23,36,49,73]],
[[15,21,37,58,65],[14,27,45,49,67],[ 3,29,0,54,72],[ 1,25,35,48,64],[11,24,40,52,74]]),
Ticket("Ticket 10",
[ 41,12,62,1,25,59,14,20,50,8,39,38,75,26,31,73,63,9,55,52,68,13,47,67,29],[34,65,6,46,27],
[[ 8,20,34,57,63],[ 7,21,41,49,65],[ 1,18,0,46,72],[14,19,38,52,66],[ 2,17,33,47,62]],
[[ 1,30,35,55,67],[10,27,39,48,75],[ 3,20,0,46,61],[12,16,37,60,68],[ 2,26,34,50,70]],
[[13,27,40,53,61],[ 6,24,33,49,74],[ 9,29,0,60,66],[ 8,18,34,55,70],[ 2,19,37,50,65]],
[[ 1,30,40,48,67],[13,29,35,59,73],[ 9,20,0,49,62],[12,25,31,53,74],[ 2,26,34,57,68]]),
Ticket("Ticket 11",
[ 21,35,73,4,34,62,63,60,13,40,10,20,75,28,46,71,23,55,38,6,30,22,66,53,3],[37,14,51,72,24],
[[12,26,41,58,66],[ 4,22,34,48,63],[10,17,0,57,68],[13,19,37,54,74],[ 3,27,40,46,72]],
[[ 6,17,32,58,73],[13,30,35,60,70],[12,23,0,53,71],[15,28,37,54,66],[11,19,40,55,75]],
[[12,16,34,48,71],[14,19,36,51,65],[ 1,24,0,57,62],[11,26,40,54,64],[ 5,20,31,47,73]],
[[ 4,24,41,51,63],[11,21,38,46,73],[ 5,17,0,57,68],[10,27,35,53,69],[13,16,34,47,64]]),
Ticket("Ticket 12",
[ 30,69,60,24,54,2,62,14,44,21,32,67,28,5,55,52,31,34,29,46,8,41,25,57,65],[15,74,59,16,39],
[[ 4,18,44,52,69],[14,26,43,51,72],[ 2,16,0,53,68],[ 3,17,40,48,66],[ 8,29,31,50,73]],
[[ 9,26,39,55,67],[15,20,37,54,68],[11,16,0,46,69],[12,21,43,60,72],[ 4,17,38,59,66]],
[[ 2,30,36,56,67],[ 6,18,39,54,69],[ 8,28,0,51,72],[15,26,34,57,68],[ 3,25,43,55,66]],
[[ 2,24,40,56,74],[ 3,17,37,54,62],[ 8,18,0,50,65],[ 5,20,32,59,73],[11,29,41,60,64]]),
Ticket("Ticket 13",
[ 22,34,14,59,44,48,57,3,61,65,10,75,37,39,47,52,20,68,64,28,31,12,58,21,74],[26,60,35,63,13],
[[15,29,44,48,63],[10,20,38,49,61],[ 6,26,0,46,64],[12,27,43,58,69],[14,30,31,57,62]],
[[ 8,20,35,60,62],[10,27,41,53,65],[15,22,0,52,73],[14,30,43,49,69],[12,16,34,55,72]],
[[ 8,23,37,48,73],[10,30,43,60,72],[13,17,0,49,66],[14,16,42,53,63],[ 3,27,39,51,68]],
[[ 1,28,37,49,72],[13,17,42,48,75],[ 6,24,0,59,65],[15,21,31,55,66],[ 8,26,43,47,74]]),
Ticket("Ticket 14",
[ 65,23,25,57,3,52,69,11,49,36,9,47,8,59,74,38,13,2,53,41,66,21,68,42,19],[34,48,20,4,63],
[[14,24,32,55,66],[15,21,34,48,72],[12,30,0,51,74],[11,23,42,53,73],[ 7,29,41,47,65]],
[[ 3,29,36,51,68],[13,30,41,58,69],[15,24,0,57,65],[ 4,17,37,50,72],[10,20,32,52,61]],
[[ 3,19,38,49,68],[12,23,32,46,66],[10,25,0,48,63],[ 9,17,33,51,74],[ 8,21,45,56,73]],
[[12,25,45,57,73],[10,23,42,56,69],[ 6,21,0,59,67],[ 2,17,33,60,66],[ 4,30,36,51,65]]),
Ticket("Ticket 15",
[ 40,13,50,37,74,61,41,25,1,45,55,23,53,75,56,11,67,27,5,19,9,62,30,58,7],[14,29,36,51,63],
[[10,16,35,56,67],[ 1,19,33,53,65],[ 9,21,0,49,68],[ 3,17,32,58,62],[14,23,37,52,75]],
[[12,21,33,56,64],[11,23,39,55,68],[ 3,25,0,50,73],[15,30,41,60,69],[14,27,35,59,63]],
[[ 6,16,40,50,63],[ 5,29,33,54,74],[13,18,0,53,64],[11,21,39,56,62],[10,27,45,59,65]],
[[13,21,40,51,64],[ 3,16,33,54,63],[ 5,28,0,49,61],[ 7,25,36,60,75],[10,26,45,52,67]]),
Ticket("Ticket 16",
[ 74,25,64,16,35,22,71,47,63,56,41,57,40,13,34,14,48,1,38,68,43,5,51,23,11],[ 9,18,70,59,32],
[[ 2,16,42,48,62],[10,24,36,47,64],[11,22,0,60,72],[ 5,23,39,53,67],[ 4,28,32,59,74]],
[[12,23,36,56,74],[ 2,29,37,58,64],[11,24,0,51,71],[13,19,44,57,63],[14,18,39,46,70]],
[[14,19,38,47,68],[ 5,28,42,46,75],[ 2,22,0,60,74],[11,25,34,50,70],[12,16,35,59,71]],
[[13,23,43,48,75],[ 4,22,37,53,68],[ 9,19,0,46,63],[ 1,16,41,60,74],[11,28,40,51,64]]),
Ticket("Ticket 17",
[ 37,49,20,10,33,56,28,4,61,40,8,19,52,66,55,74,6,73,67,41,34,59,22,14,15],[68,7,25,53,43],
[[ 3,29,42,56,69],[ 7,19,45,55,75],[11,20,0,57,68],[12,25,34,53,66],[ 2,22,33,47,63]],
[[11,19,36,57,67],[ 8,22,37,54,63],[ 7,25,0,53,74],[ 3,16,34,50,70],[15,20,43,52,65]],
[[ 2,25,42,54,67],[ 3,24,35,53,74],[10,30,0,50,66],[ 4,29,40,49,62],[ 6,28,43,57,73]],
[[12,25,42,55,68],[ 7,30,31,53,61],[14,22,0,46,75],[15,16,41,59,69],[11,20,33,57,66]]),
Ticket("Ticket 18",
[ 48,15,5,52,59,37,73,10,25,33,54,50,22,65,74,71,41,14,23,7,16,61,43,20,39],[51,30,32,8,72],
[[10,28,41,51,71],[ 8,26,31,48,70],[ 9,19,0,50,63],[ 4,17,43,46,75],[14,18,32,54,69]],
[[ 4,30,40,50,61],[ 8,28,34,56,65],[ 6,22,0,51,63],[ 9,18,43,59,73],[ 7,16,33,47,70]],
[[ 9,22,38,48,72],[ 5,17,32,57,74],[ 8,23,0,49,75],[15,26,37,50,70],[ 1,30,36,59,63]],
[[ 2,25,32,51,71],[ 7,16,39,56,68],[ 6,17,0,52,65],[ 1,20,43,47,75],[ 8,18,34,59,72]]),
Ticket("Ticket 19",
[ 17,70,15,51,75,53,23,73,52,27,30,6,46,69,12,2,1,43,29,40,56,31,34,32,71],[24,59,72,38,14],
[[12,26,31,60,63],[ 9,29,40,56,69],[13,17,0,51,70],[15,27,43,49,72],[ 1,18,32,59,71]],
[[12,16,41,59,69],[15,19,40,49,73],[ 2,23,0,47,64],[ 7,24,43,57,75],[ 4,30,35,46,65]],
[[ 4,18,41,50,71],[ 6,29,35,52,74],[ 9,26,0,46,72],[ 3,20,38,57,73],[ 5,19,44,56,63]],
[[ 5,29,41,57,73],[ 3,23,38,51,69],[ 4,27,0,46,63],[14,17,34,53,74],[13,28,39,50,65]])
]
def main():
total_dollars = 0
for ticket in Tickets:
dollars, results = ticket.Play()
if dollars:
print "%s:" % ticket.name
for line in results:
print " %s" % line
print " $%i" % dollars
total_dollars += dollars
print
print "total $%i" % total_dollars
if __name__ == "__main__":
main()
« Older Boobs in Bangkok: "Wayward Betty" tells... | The Economist asks a few econo... Newer »
This thread has been archived and is closed to new comments
posted by Blazecock Pileon at 11:03 AM on February 1, 2011