fir3net

PPS-Firenetbanner-780.5x190-30-03-17

Python - Lottery Number Generator

Below is a very small and basic lottery number generating program. Designed to purley show a working example of the random function.

import random
lotterynumbers = []
x = 0

while x < 6:
    lotterynumbers.append(random.randint(1, 49))
    x += 1

lotterynumbers.sort()
print lotterynumber

 

 

Tags: Python