Python - Lottery Number Generator
Tuesday, 01 February 2011 23:00

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 lotterynumbers



 
We have 24 guests online