Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- oop=bool("false")
- def gener():
- import random
- try:
- global dir
- global BaseRandom
- global por,lka
- lka=""
- por=""
- BaseRandom=random.randint(-99999999999999999999,99999999999999999999)
- BaseRandom=str(BaseRandom)+".txt"
- dir=""
- import random
- def assign():
- global r
- r=random.randint(2,36)
- if r==2 or r==3 or r==4 or r==5 or r==6 or r==7 or r==8 or r==9 or r==10 :
- r=r-1
- r=str(r)
- elif r==11:
- r="A"
- elif r==12:
- r="B"
- elif r==13:
- r="C"
- elif r==14:
- r="D"
- elif r==15:
- r="E"
- elif r==16:
- r="F"
- elif r==17:
- r="G"
- elif r==18:
- r="H"
- elif r==19:
- r="I"
- elif r==20:
- r="J"
- elif r==21:
- r="K"
- elif r==22:
- r="L"
- elif r==23:
- r="M"
- elif r==24:
- r="N"
- elif r==25:
- r="O"
- elif r==26:
- r="P"
- elif r==27:
- r="Q"
- elif r==28:
- r="R"
- elif r==29:
- r="S"
- elif r==30:
- r="T"
- elif r==31:
- r="U"
- elif r==32:
- r="V"
- elif r==33:
- r="W"
- elif r==34:
- r="X"
- elif r==35:
- r="Y"
- elif r==36:
- r="Z"
- a=input("Codici da generare: ")
- a=int(a)
- a=a+1
- b=input("Sequenze per codice: ")
- b=int(b)
- b=b
- c=input("Caratteri per sequenza: ")
- c=int(c)
- for l in range(a):
- print(dir)
- pos = dir.count(" ")
- pos=pos+1
- if pos==b+1:
- dir=""
- por=por+" "+dir
- print(por)
- out_file = open(BaseRandom,"w")
- lop=por+"\n"
- lop=str(lop)
- out_file.write(lop)
- dir=""
- for p in range(b):
- dir=dir+" "
- for d in range(c):
- assign()
- assign()
- dir=dir+r
- input("Clicca per cancellare")
- print('\n'*1000)
- except ValueError:
- input("Devi inserire un numero, non una lettera")
- print('\n'*1000)
- while oop:
- gener()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement