Bugged-up Pass Gen
I have a password generator that I am working on. There are two ways to generate the passwords but I want the user to decide which way they want to. Both of the ways work perfectly, but choosing it doesn’t work. It’s always giving me an error about not defining something. Here is my code below: import random passType = input(“What type of password would you like? Types are random characters, and then there are passwords that you can easily remember. Type either ‘pass1’ or ‘pass2’”) if passType == pass1: characters = “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890” def password(arr, passlen=12): random = arr[randoms(0, len(arr))] count = passlen password = “” for i in range(count): password = password + random random = arr[randoms(0, len(arr))] return password def randoms(min, max): return random.randint(min, max) print(password(characters)) elif passType == pass2: name = input(“What is your first name?”) Lname = input(“What is the first letter of your last name?”) numbers = input(“Type in the string of numbers of your birth day, month, and year. ( no slashes or spaces, just numbers )”) print(name+Lname+numbers)