How to win the Power Ball with Python

How to win the Power Ball with Python
How to win the Power Ball with Python

This is, of course, not a guide on how to win the Powerball!

This is just a random generator that provides a line of numbers that corresponds to the PowerBall.

To get the big reward from the PowerBall, you need to guess five white balls right + 1 Powerball right.

That is 1 : 292,201,338 chance. (You can read more about the PowerBall here)

I have created a python script that prints five numbers and 1 Powerball number.

The five numbers need to be between 1 – 69, while the star numbers need to be between 1- 26.

The following code looks like this:

import random

Ballnumber = []
Powernumber = []

for i in range (0,5):
    number = random.randint(1,69)
    while number in Ballnumber:
        number = random.randint(1,69)

for j in range (0,1):
    lnumber = random.randint(1,26)
    while lnumber in Powernumber:
        lnumber = random.randint(1,26)

print("White Balls Today: ")
print("Power Ball Number Today: ")

Disclaimer: The author makes no warranties, guarantees or representations, of any kind, express or implied, as to the usefulness, completeness, or reliability of the information contained in the codes.

Quoted from “Play Responsibly. Never spend more than you can afford on any lottery product. Please remember, it’s just a game.”