Advertisement
angryatti

TheNewHungarianDailyLotteryv2

Sep 1st, 2024 (edited)
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.08 KB | None | 0 0
  1. import random
  2. randomarray = list()
  3.  
  4. def lottery(ranging,countofnumber):
  5.     random.seed()
  6.     randomarray=random.sample(range(1, ranging+1), countofnumber)
  7.  
  8.     if randomarray[0]>=100:
  9.         return 0
  10.  
  11.     return (randomarray)[0]
  12.  
  13. def symbol(ranging = 20)->int:
  14.     random.seed()
  15.     arrayofsymbol = ["none","nap","autó","hal","gomba","alma","óra","horgony","hold","ház","bagoly","virág","szőlő","labda","zászló","csillag","gyémánt","könyv","pálmafa","sziv","bögre"]
  16.     temp = random.sample(range(1,ranging+1),1)[0]
  17.     return str(temp).zfill(2), arrayofsymbol[temp]
  18.  
  19. print("Napi mázli","Év: ", str(lottery(100,1)).zfill(2),"Hónap: ",str(lottery(12,1)).zfill(2),"Nap: ",str(lottery(31,1)).zfill(2),"Szimbolum: ",symbol())
  20.  
  21. print("Több tippet kér? Adja meg a számot, hogy mennyit!")
  22. countoftip = input("Tippek száma: ")
  23.  
  24. if (countoftip.isnumeric()):
  25.     for i in range (int(countoftip)):
  26.          print(i+1,"Napi mázli","Év: ", str(lottery(100,1)).zfill(2),"Hónap: ",str(lottery(12,1)).zfill(2),"Nap: ",str(lottery(31,1)).zfill(2),"Szimbolum: ",symbol())
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement