Welcome to my Website!
import random
def generator(length_input):
SYMBOLS = ["!","@","#","$","%","^","&","*","(",")","_","+","-","~"]
LOWER_ALPHABET = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
UPPER_ALPHABET = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
pw = ""
for i in range(length_input):
#include symbols
if (len(SYMBOLS) >0):
chosen = random.choice(SYMBOLS)
pw += chosen
#exclude similar characters
SYMBOLS.remove(chosen)
if (len(LOWER_ALPHABET) >0):
#include lowercase
chosen = random.choice(LOWER_ALPHABET)
pw += chosen
#exclude similar characters
LOWER_ALPHABET.remove(chosen)
if (len(UPPER_ALPHABET) >0):
#include uppercase
chosen = random.choice(UPPER_ALPHABET)
pw += chosen
#exclude similar characters
UPPER_ALPHABET.remove(chosen)
return pw
def main():
length_input = int(input("Please choose a password length. 6-15 weak, strong 16+ \n"))
password = generator(length_input)
print("Your new password is:", password, "")
#print(decrypted)
if __name__ == '__main__':
main()
To learn more HTML/CSS, check out these tutorials!