Skip to content

App reads spreadsheets containing historical winning numbers from Powerball and Mega Millions to provide frequencies of numbers drawn and guesses the next winning numbers. **FOR ENTERTAINMENT ONLY**

Notifications You must be signed in to change notification settings

flakkmonkey/LottoPrediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lottery Number Prediction Script

This Python script analyzes past winning numbers from Powerball and Mega Millions games and predicts potential future winning numbers based on frequency analysis. The script reads historical data from an Excel file, calculates the frequency of each number, and then generates possible combinations of numbers for the next draw.

Features

  • Frequency Analysis: Calculates the frequency of winning numbers and Powerball/Megaball numbers from historical data.
  • Combination Generator: Generates unique combinations of the most frequent numbers.
  • Prediction: Predicts the next set of winning numbers based on historical frequency data.

Requirements

  • Python 3.x
  • Pandas (pip install pandas)
  • OpenPyXL (pip install openpyxl)

Installation

  1. Clone or download the repository:

    git clone https://github.com/flakkmonkey/LottoPrediction.git
    cd /path/to/download/directory
  2. Install required Python packages:

    pip install pandas openpyxl
  3. Prepare the Excel files (or use the Excel files provided in this repository):

    • Create two Excel files named powerball.xlsx and megamillions.xlsx.
    • Each file should have a sheet named winners containing the following columns:
      • Winning Numbers: A string of winning numbers separated by spaces (e.g., "04 15 24 35 58").
      • Powerball (or Megaball for Mega Millions): The Powerball/Megaball number (e.g., 14).

Usage

  1. Run the script:

    python lottery_prediction.py
  2. Choose the game:

    • You will be prompted to choose between Powerball and Mega Millions.
    • Enter 1 for Powerball or 2 for Mega Millions.
  3. View Results:

    • The script will output the six most frequently drawn winning numbers and the five most frequently drawn Powerball/Megaball numbers.
    • It will also generate unique combinations of 5 numbers from the 6 most frequent winning numbers.
    • Finally, it will predict the next set of winning numbers and the next Powerball/Megaball number based on historical data.

Example Output

Choose a game (1 for 'Powerball' or 2 for 'Mega Millions'): 1
Six Most Frequently Drawn Winning Numbers:
Winning Number 15 appears 20 times
Winning Number 32 appears 18 times
...
Five Most Frequently Drawn Powerball/Megaball Numbers:
Powerball/Megaball Number 14 appears 10 times
...

Unique Combinations of 5 Numbers from the 6 Most Frequent Winning Numbers:
(15, 32, 12, 18, 25)
(15, 32, 12, 18, 44)
...

Predicted Next Winning Numbers: ['15', '32', '12', '18', '25']
Predicted Next Powerball/Megaball Number: 14

Notes

  • The script assumes the historical data is clean and follows the expected format.
  • The predictions are based on frequency analysis and should not be considered as guaranteed outcomes.

About

App reads spreadsheets containing historical winning numbers from Powerball and Mega Millions to provide frequencies of numbers drawn and guesses the next winning numbers. **FOR ENTERTAINMENT ONLY**

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages