mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-19 00:37:02 +00:00
Update password_generator.py
increased user interactivity and more powerful usage of modules.
This commit is contained in:
parent
e4ef5d41cd
commit
aad3fca610
|
@ -12,3 +12,17 @@ max_length = 16
|
||||||
password = ''.join(random.choice(chars) for x in range(random.randint(min_length, max_length)))
|
password = ''.join(random.choice(chars) for x in range(random.randint(min_length, max_length)))
|
||||||
print('Password: ' + password)
|
print('Password: ' + password)
|
||||||
print('[ If you are thinking of using this passsword, You better save it. ]')
|
print('[ If you are thinking of using this passsword, You better save it. ]')
|
||||||
|
# ALTERNATIVE METHODS
|
||||||
|
# ctbi= characters that must be in password
|
||||||
|
# i= how many letters or characters the password length will be
|
||||||
|
def password_generator(ctbi, i):
|
||||||
|
# Password generator = full boot with random_number, random_letters, and random_character FUNCTIONS
|
||||||
|
def random_number(ctbi, i):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def random_letters(ctbi, i):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def random_characters(ctbi, i):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user