A random password generator is a software program, hardware device, or online tool that automatically generates a password using parameters that a user sets, including mixed-case letters, numbers, symbols, pronounceability, length, and strength.
Here is the simple python code to generate password randomly.
#random module
import random
print("=================\nPassword Generator\n=================")
print()
characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@_#$%&*0123456789"
#Input Number of password
Num_Of_pass = int(input(" How many passwords do you want?: "))
# Input length of password
len_Of_pass = int(input(' Enter lenth of password you want to generate : '))
print()
print("Passwords are: ")
print()
#for Number of password
for i in range(Num_Of_pass):
#to store password
password = ''
# for length of password
for i in range(len_Of_pass):
password = password + random.choice(characters)
print(password)
Comments
Post a Comment