Password Generator Beginner

 Need a password, but cant think of one?? No need to worry, simply create your own password generator with these simple python codes: 

(wrote by frazmetic)

Analysis of the code: 

import random = imports the random module (this will allow choosing different numbers)

int = integer

range(number), range(length) = this will get data from the user since it includes an input and will output how many passwords and the length of it.

password +=  = this means it will add numbers and length and give instant results 

random.choice = randomly selected element from the specified sequence (which is "chars")


#password generator

import random
chars = "abcedfghijklmonpqrstuvwxyzABCDEFGHIJKLMONPQRSTUVWXYZ12345678890<>?@:{}+_-!@.//^"

number = input("How many passwords do you want?: ")
number = int(number)

length = input("Length of the Password: ")
length = int(length)

for i in range(number):
password = ""
for a in range(length):
password += random.choice(chars)
print(password)
print("Made by Lukman(Frazmetic)")


#The link where i got this code when i first started to make this:
https://www.instructables.com/How-To-Creating-a-Random-Password-Generator-With-P/

Comments

Post a Comment

Popular posts from this blog

Scoreboard Unit 4 - programming

[Simple] Maths Quiz