SHARE
TWEET

Untitled

a guest Nov 20th, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random
  2.  
  3. def generujDane(zakres):
  4.     randomowe = []
  5.     while len(randomowe) != zakres:
  6.         element = random.randint(0, zakres)
  7.         if element not in randomowe:
  8.             randomowe.append(element)
  9.     return randomowe
  10.  
  11. zakresy = ('10','20') #,'30','40','50','60','70','80','90','100','200','300','400', '500','600','700','800','900','1000','2000','3000','4000','5000','6000','7000','8000','9000','10000','20000','30000','40000','50000','60000','70000','80000','90000', '100000')
  12.  
  13. if __name__ == "__main__":
  14.  
  15.     for z in zakresy:
  16.         print(z)
  17.         sciezka = 'dane'+z+'.txt'
  18.         print(sciezka)
  19.         f = open(sciezka, 'w+')
  20.         dane = str(generujDane(int(z)))
  21.         print(dane)
  22.         f.write(dane)
  23.         f.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top