- Home
- Premium Memberships
- Lottery Results
- Forums
- Predictions
- Lottery Post Videos
- News
- Search Drawings
- Search Lottery Post
- Lottery Systems
- Lottery Charts
- Lottery Wheels
- Worldwide Jackpots
- Quick Picks
- On This Day in History
- Blogs
- Online Games
- Premium Features
- Contact Us
- Whitelist Lottery Post
- Rules
- Lottery Book Store
- Lottery Post Gift Shop
The time is now 1:15 pm
You last visited
June 3, 2026, 5:36 pm
All times shown are
Eastern Time (GMT-5:00)
There was no need to include any "divide by zero" logic in the hot/cold script!
Published:
The divisor in the program when calculating the percent to auto range hot and cold is always equal to the number of draws (X). The dividend is the number of times a particular number was counted. If a number does not appear, 0 divided by X is a legal operation that returns 0.
Had this been a situation where the divisor MIGHT equal zero there are 2 ways (at least) to deal with it in Python. One is an if statement to check that the divisor was > 0, the other is a Try and Except block that would try the division and execute the code in an except block if it encountered a divide by zero error.
To test, I ran the code with a small value of X=5, and the numbers that had a count of 0 were classified as cold with a percent of 0.
When I added that as an item to the checklist (to check for possible errors) I was just trying to cover everything that could go wrong. So, stopping to think about what was actually happening resulted in adding no extra lines of code because the scenario of division BY zero was not a thing that could happen (unless for some reason I set X to 0, then I guess I would deserve that error.
Now it is time to freeze the updating and study the output to find any links between the classifications of hot and cold and the follower distributions. The first experiments have determined that using hot and cold as a reduction technique still leaves a great deal of numbers in the neutral zone, but the neutral classification NNN appears way more than any other classification combo.
Knowing that there is no chance for the division by zero error means that this script will work with the jackpot games as well... a place where eliminating numbers could be more helpful!

Comments
This Blog entry currently has no comments.
Post a Comment
Please Log In
To use this feature you must be logged into your Lottery Post account.
Not a member yet?
If you don't yet have a Lottery Post account, it's simple and free to create one! Just tap the Register button and after a quick process you'll be part of our lottery community.
Register