Question: THIS IS FOR PYTHOND CODING: Starter Code: #Starter code import random #Global variables #------------------ #uppercase list UPCASE = ['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'] #lowercase list LCASE = ['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'] #special

THIS IS FOR PYTHOND CODING:

 THIS IS FOR PYTHOND CODING: Starter Code: #Starter code import random#Global variables #------------------ #uppercase list UPCASE = ['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'] #lowercase list LCASE =

Starter Code:

#Starter code

import random

#Global variables #------------------ #uppercase list UPCASE = ['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'] #lowercase list LCASE = ['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'] #special character list SPECIAL = ['~','!','@','#','$','%','^','&','*','|','','?'] #number list NUMBER = ['1','2','3','4','5','6','7','8','9','0'] #------------------

def main(): finish = False; #use a while loop to keep generating passwords until we find one that satisfies every criteria while finish == False: pw = generatePassword() finish = verify_password(pw) #print password print (pw)

#define password generator function def generatePassword(): #declare password variable

#generate password string using length requirements the declared lists #return password to where it was called return password #define verification function def verify_password(PW): #write the code that checks to see if the password has between 8 and 12 characters and contains atleast one character from each list return False if any of these requirements aren't met

main()

P1208 Password Generator Thinking 54 Outside the box Many websites require users to create passwords that meet certain criteria. When the user first creates an account or forgets her password, the site auto-generates a temporary password for her. This randomly generated password must meet all the password requirements. For this exercise, assume that all passwords must meet the following criteria: password must be between 8 and 12 characters long password must contain at least 1 lowercase letter password must contain at least 1 uppercase letter password must contain at least 1 number password must contain at least one of the following symbols. ~!@#$%"&? Your task is to use lists or strings to generate a random password string that meets these criteria. For security reasons, your password must be truly random. You cannot decide ahead of time that the 4th character will always be a digit, for example. Nor should you fix the length of the password (it must be randomly picked to be between 8 and 12 characters long). Starter Code Here Hint: the best way to do this may be to continuously generate random passwords using all the legal symbols until you generate one that meets all the criteria. Begin by creating a function that tests whether or not a given password is valid. Rubric Below

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!