Advertisement
aaronvan

Lottery Tick Pick

Dec 8th, 2014
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. import random
  2.  
  3. def main():
  4.     bigWinner()
  5.    
  6. def bigWinner():
  7.     count = 0
  8.     ticket = []
  9.     while count < 6:
  10.         number = random.randrange(1, 50)
  11.         if not(number in ticket):
  12.             ticket.append(number)
  13.         else:
  14.             count -= 1
  15.         count += 1
  16.     ticket.sort()
  17.     print(ticket)
  18.  
  19. if __name__ == "__main__":     
  20.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement