diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..615aafb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.pythonPath": "/usr/bin/python3" +} \ No newline at end of file diff --git a/src/main.py b/src/main.py index fc9a525..a6ae71e 100644 --- a/src/main.py +++ b/src/main.py @@ -1,12 +1,23 @@ # Resolve the problem!! -import string +import string, random SYMBOLS = list('!"#$%&\'()*+,-./:;?@[]^_`{|}~') def generate_password(): - # Start coding here + random_len = random.randint(8,16) + secure_password = '' + secure_password += SYMBOLS[random.randint(0, 27)] + secure_password += str(random.randint(0,9)) + #secure_password += + #secure_password += + + print(secure_password) + for element in range(0,random_len - 2): + secure_password += string.ascii_letters[random.randint(0,46)] + print(secure_password) + return secure_password def validate(password):