Skip to content

Commit 2910a9e

Browse files
Update project_13_random_password_generator.py
1 parent d31a308 commit 2910a9e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

project_13_random_password_generator.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,21 @@
1313
characters = list(string.ascii_letters + string.digits + "!@#$%^&*()")
1414

1515
def generate_password():
16-
pass
16+
password_length = int(input("How long would you like your password to be? "))
17+
18+
random.shuffle(characters)
19+
20+
password = []
21+
22+
for x in range(password_length):
23+
password.append(random.choice(characters))
24+
25+
random.shuffle(password)
26+
27+
password = "".join(password)
28+
29+
print(password)
30+
31+
generate_password()
1732

1833
# Continuing...

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy