Welcome to Shidler passgen!
Input length of password: 12
Use letters(if yes write 1, if no write 2)?: 1
Ok! Now write generator() to generate your password!
Generating password...
Traceback (most recent call last):
File "/data/data/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>
start(fakepyfile,mainpyfile)
File "/data/data/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
exec(open(mainpyfile).read(), __main__.__dict__)
File "<string>", line 21, in <module>
File "<string>", line 18, in generator
UnboundLocalError: local variable 'b' referenced before assignment
[Program finished]
import random
print('Welcome to Shidler passgen!')
password = 'pustokakymenavgolove'
def settings():
a = int(input('Input length of password: '))
b = int(input('Use letters(if yes write 1, if no write 2)?: '))
if b < 1:
print('incorrect value')
settings()
elif b > 2:
print('incorrect value')
settings()
else:
print('Ok! Now write generator() to generate your password!')
settings()
def generator():
print('Generating password...')
while b > 0:
print(random.random())
b -= b
generator()
input()
Input length of password: 12
Use letters(if yes write 1, if no write 2)?: 1
Ok! Now write generator() to generate your password!
Generating password...
Traceback (most recent call last):
File "/data/data/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>
start(fakepyfile,mainpyfile)
File "/data/data/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
exec(open(mainpyfile).read(), __main__.__dict__)
File "<string>", line 21, in <module>
File "<string>", line 18, in generator
UnboundLocalError: local variable 'b' referenced before assignment
[Program finished]
import random
print('Welcome to Shidler passgen!')
password = 'pustokakymenavgolove'
def settings():
a = int(input('Input length of password: '))
b = int(input('Use letters(if yes write 1, if no write 2)?: '))
if b < 1:
print('incorrect value')
settings()
elif b > 2:
print('incorrect value')
settings()
else:
print('Ok! Now write generator() to generate your password!')
settings()
def generator():
print('Generating password...')
while b > 0:
print(random.random())
b -= b
generator()
input()