3.15LAB: Password modifier Many user-created passwords are simple…

Question Answered step-by-step 3.15LAB: Password modifier Many user-created passwords are simple… 3.15 LAB: Password modifierMany user-created passwords are simple and easy to guess Code a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending “!” to the end of the input string.i becomes 1a becomes @m becomes MB becomes 8s becomes $Ex: If the input is:mypasswordthe output is:Myp@$$word!Hint: Python strings are immutable, but support string concatenation. Store and build the stronger password in the given password variable.396518.2561598.qx3zqy7Code#Takinf password as inputpassword_in = str(input()) #Converting the sting entered by the user to list of characterspassword = [char for char in password_in] #Checking and replacing the characters in the password using predefined replacements using if elsefor i in range(len(password)):    if password[i] == “i”:        password[i] = “!”    elif password[i] == “a”:        password[i] = “@”    elif password[i] == “m”:        password[i] = “M”    elif password[i] == “B”:        password[i] = “8”    elif password[i] == “o”:        password[i] = “.” #Appending “q*s” at the end of passwordpassword.append(“q*s”) #Converting password back to stringpasswordNew = “”for x in password:    passwordNew += x  #Displating the new passwordprint(passwordNew)1: Compare outputkeyboard_arrow_up0 / 4Output differs. See highlights below.InputpasswordYour o..p@ssw.rdq*sExpected outputp@$$word!2: Compare outputkeyboard_arrow_up0 / 3Output differs. See highlights below.InputmyBirthdayYour outputMy8!rthd@yq*sExpected outputMy81rthd@y!3: Compare outputkeyboard_arrow_up0 / 3Output differs. See highlights below.InputsecretPzwrdYour outputsecretPzwrdq*sExpected output$ecretPzwrd! Computer Science Engineering & Technology Python Programming CODING CYB/130 Share QuestionEmailCopy link Comments (0)