Showing my father what playing Eurojackpot really costs
My father plays the lottery and hopes to win the Eurojackpot. I wanted to show him, with his own numbers, how much the habit actually costs over time, so I wrote a Python script that analyzes his Eurojackpot tickets and adds up what he has spent against what he has won.
How the script works
The script pulls official Eurojackpot results from Eurojackpot.de, compares them to your tickets, and reports total spent, total won, and net loss. It uses requests to fetch the draws, caches them locally, and reads tickets from a file.
It downloads every draw within a given period, checks each of your tickets against it, sums the spending and the winnings, and logs the outcome per draw.
Example usage
Save your tickets in a tickets.json file (as a list of lists, each containing 5 main numbers and 2 Euro numbers):
[
[1, 12, 23, 34, 45, 2, 9],
[5, 14, 22, 33, 44, 3, 10]
]
Run the script from the terminal:
python howtolosemoneyfast.py --lookback-days 365 --ticket-file tickets.json --verbose
What you’ll see
For each draw the script shows whether your tickets won anything, then prints a summary like:
Total spent on tickets: 956.80€
Total won: 0.00€
Net loss: 956.80€
What my father took from it
Over a year he had spent thousands of euros and won back almost nothing. Seeing it as one number landed better than any argument about odds.
Check out the GitHub repository for the full code and instructions.