Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "C:\\Users\\MARIA ANGELICA\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe"
}
17 changes: 16 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
# Resolve the problem!!
import string
import string
import random


SYMBOLS = list('!"#$%&\'()*+,-./:;?@[]^_`{|}~')

lower = string.ascii_lowercase
upper = string.ascii_uppercase
digits = string.digits

def generate_password():
# Start coding here
entero = random.randint(1,3)
password = ""
contracena_minus = random.sample(lower, entero)
contracena_mayus = random.sample(upper, entero)
contracena_simbols = random.sample(SYMBOLS, entero)
contracena_digits = random.sample(digits, entero)
passwordlist = contracena_mayus + contracena_minus + contracena_digits + contracena_simbols

password = password.join(passwordlist)
return password


def validate(password):
Expand Down