From 224ec8af54469b78fa964b4f87e988eae49db483 Mon Sep 17 00:00:00 2001 From: VamilP Date: Fri, 21 Jul 2023 15:21:13 +0530 Subject: [PATCH 1/2] A Powerful Password Generator --- Password Generator/Password Generator | 1 + 1 file changed, 1 insertion(+) create mode 160000 Password Generator/Password Generator diff --git a/Password Generator/Password Generator b/Password Generator/Password Generator new file mode 160000 index 0000000000..1649cad6e8 --- /dev/null +++ b/Password Generator/Password Generator @@ -0,0 +1 @@ +Subproject commit 1649cad6e8c72cdcfae2c252e0cc0417c4c710c7 From 9dae0ab19be4a7a5ebfa3630d4cc5870dd65ea6c Mon Sep 17 00:00:00 2001 From: VamilP Date: Tue, 1 Aug 2023 20:37:23 +0530 Subject: [PATCH 2/2] powerful-password-generator --- Password Generator/Password Generator | 1 - Powerful-Password-Generator/script.py | 31 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) delete mode 160000 Password Generator/Password Generator create mode 100644 Powerful-Password-Generator/script.py diff --git a/Password Generator/Password Generator b/Password Generator/Password Generator deleted file mode 160000 index 1649cad6e8..0000000000 --- a/Password Generator/Password Generator +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1649cad6e8c72cdcfae2c252e0cc0417c4c710c7 diff --git a/Powerful-Password-Generator/script.py b/Powerful-Password-Generator/script.py new file mode 100644 index 0000000000..fc21e6d572 --- /dev/null +++ b/Powerful-Password-Generator/script.py @@ -0,0 +1,31 @@ +#Powerful Password Generator Project +import random +letters = ['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', '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'] +numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] +symbols = ['!', '#', '$', '%', '&', '(', ')', '*', '+'] + +print("Welcome to the Password Generator!") +nr_letters = int(input("How many letters would you like in your password?\n")) +nr_symbols = int(input(f"How many symbols would you like?\n")) +nr_numbers = int(input(f"How many numbers would you like?\n")) + +password_list = [] + +for char in range(1, nr_letters + 1): + password_list.append(random.choice(letters)) + +for char in range(1, nr_symbols + 1): + password_list += random.choice(symbols) + +for char in range(1, nr_numbers + 1): + password_list += random.choice(numbers) + +print(password_list) +random.shuffle(password_list) +print(password_list) + +password = "" +for char in password_list: + password += char + +print(f"Your password is: {password}") \ No newline at end of file