Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. import random
  2.  
  3. def generator_loto_stevil():
  4.  
  5. loto_stevila = []
  6. print " "
  7. print "Pozdravljeni! To je generator loto stevilk!"
  8. print " "
  9. st_vnos = int(raw_input("Koliko stevil zelite zgenerirati?:"))
  10. while True:
  11. rng_st = random.randint(1, 39)
  12. if (len(loto_stevila) + 1) > st_vnos:
  13. break
  14. elif rng_st not in loto_stevila:
  15. loto_stevila.append(rng_st)
  16. else:
  17. return True
  18.  
  19.  
  20. print loto_stevila
  21.  
  22. generator_loto_stevil()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement