-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPassword_Generator
More file actions
29 lines (26 loc) · 1.26 KB
/
Password_Generator
File metadata and controls
29 lines (26 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import random
print(r""" ____ _ ____ ______ _____ ____ ____
| _ \ / \ / ___/ ___\ \ / / _ \| _ \| _ \
| |_) / _ \ \___ \___ \\ \ /\ / / | | | |_) | | | |
| __/ ___ \ ___) |__) |\ V V /| |_| | _ <| |_| |
|_|_/_/___\_\____/____/_ \_/\_/ \___/|_|_\_\____/___
/ ___| ____| \ | | ____| _ \ / \|_ _/ _ \| _ \
| | _| _| | \| | _| | |_) | / _ \ | || | | | |_) |
| |_| | |___| |\ | |___| _ < / ___ \| || |_| | _ <
\____|_____|_| \_|_____|_| \_\/_/ \_\_| \___/|_| \_\"""")
print("Welcome to the password generator!")
characters = int(input("How many letters would you like? "))
digits = int(input("How many numbers would you like? "))
symbols = int(input("How many symbols would you like? "))
letter = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
number = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
symbol = ['!', '/', '*', '?', '"', '<', '>', '|']
password = []
for num in range(characters):
password += random.choice(letter)
for num in range(digits):
password += random.choice(number)
for num in range(symbols):
password += random.choice(symbol)
random.shuffle(password)
print(f"Your password is: ", "".join(password))