I need help with the coding for this exercise. I need code for a…

Question Answered step-by-step I need help with the coding for this exercise. I need code for a… I need help with the coding for this exercise. I need code for a password generator on python with this criteria.So far I have this but it appears not to be working.  password = input(“Enter the password: “) MIN_PASSWORD_LENGTH = 6 MAX_PASSWORD_LENGTH = 10 flag = 0 if (len(password) >= MIN_PASSWORD_LENGTH and len(password) <= MAX_PASSWORD_LENGTH): # hare we check length should be between 6 to 10 including if password = ("[a-zA-Z]", password): # this line check password contain alphabets or not using regex flag += 1 if password ("[0-9]", password): # this line check password contain numbers or not using regex flag += 2 if (flag==1): # this line check password contain only alphabets and print message print("password is weak - contains only letters.") break elif (flag==2): # this line check password contain only numbers and print message print("password is weak - contains only numbers.") break else: # this statement print message if password contain both alphabets and number print("password is strong.") break else: print("Password length must to between 6 to 10 please re-enter password ") The criteria is below  Image transcription textCoding: Write the Python code for the given Program Specification. Note: You must use 'named constants" forfixed amounts e.g. MlN_PASSWURD_LENGTI—i = B MAX_PAS SWDR ELLENGTH = 1fl| Code Documentation:Within your code include internal single line comments to explain the coding structure you haye u... Show more... Show more  Computer Science Engineering & Technology Python Programming ICTPRG 301 Share QuestionEmailCopy link Comments (0)