Simple Password Generator
Here we are generating the password based on customer requirement as how many letters, numbers and symbols that needs to be in the password
Below is the code for Simple Password Generator in Python
print("Welcome to PGRSPOT Simple Password Generator !!!")
import random
letters = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","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","S","U","V","W","X","Y","Z"]numbers = ["0","1","2","3","4","5","6","7","8","9"]symbols = ["!","@","#","$","%","^","&","*","(",")"]
no_of_letters = int(input("Enter the number of letters: \n"))no_of_numbers = int(input("Enter the number of numbers: \n"))no_of_symbols = int(input("Enter the number of symbols: \n"))
password = ""
for i in range(0, no_of_letters): password = password + random.choice(letters) #print(password)
for i in range(0, no_of_numbers): password = password + random.choice(numbers) #print(password)
for i in range(0, no_of_symbols): password = password + random.choice(symbols) #print(password)
print(f"Your simple password is: {password}")
You can find the video tutorial below:
1 Comments
It is simple to understand bro!!
ReplyDeletePost a Comment