Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import random
- word = "QWERTYUIOPLKJHGFDSAZXCVBNMqwertyuioplkjhgfdsazxcvbnm"
- sym = "*#@$0123456789"
- no = int(input("\nHow many passwords do you want "))
- for i in range(1,no):
- strength = input("\nEnter type of password strength.... \n Press S for Strong, M for Medium & L for Low... >")
- if strength == "S" or strength == "s":
- passwd = []
- for i in range(8):
- passwd += random.choice(word)
- passwd.append(random.choice(sym))
- print("\n"+"".join(passwd))
- elif strength == "M" or strength == "m":
- passwd = []
- for i in range(6):
- passwd += random.choice(word)
- print("\n"+"".join(passwd))
- elif strength == "l" or strength == "L":
- passwd = []
- for i in range(5):
- passwd += random.choice(word)
- print("\n"+"".join(passwd))
- else:
- print("Invalid choice")
- exit(0)
Add Comment
Please, Sign In to add comment