Skip to content

Commit 20682b3

Browse files
committed
Sibiraj
1 parent 9facc5a commit 20682b3

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

currency converter/import random.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import random
2+
import string
3+
4+
def generate_password(length=12):
5+
characters = string.ascii_letters + string.digits + string.punctuation
6+
password = ''.join(random.choice(characters) for _ in range(length))
7+
return password
8+
9+
if __name__ == "__main__":
10+
password_length = int(input("Enter the desired password length: "))
11+
generated_password = generate_password(password_length)
12+
print("Your generated password is:", generated_password)

random pass generator .py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import random
2+
import string
3+
4+
def generate_password(length=12):
5+
characters = string.ascii_letters + string.digits + string.punctuation
6+
password = ''.join(random.choice(characters) for _ in range(length))
7+
return password
8+
9+
if __name__ == "__main__":
10+
password_length = int(input("Enter the desired password length: "))
11+
generated_password = generate_password(password_length)
12+
print("Your generated password is:", generated_password)

0 commit comments

Comments
 (0)