Sterzolg

Codice Sorgente Lotteria Python

Feb 18th, 2014
387
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Python 2.7.6
  2.  
  3. import random
  4. import time
  5.  
  6.  
  7. def lotterianomi(x):
  8.     for i in range (0,len(x)-1):
  9.         m=random.randint(0,len(x)-1)
  10.         time.sleep(5)
  11.         print x[m] +" eliminato"
  12.         del x[m]
  13.  
  14.     print x[0] + " Vincitore "
  15.  
  16.  
  17. lotterianomi ["Luca","Mario","Anna","Francesca"]
RAW Paste Data