4.15 LAB: Password modifier Many user-created passwords are simple and easy to guess. Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "q*s" to the end of the input string.
i becomes !
a becomes @
m becomes M
B becomes 8
o becomes .
Ex: If the input is: mypassword the output is: Myp@ssw.rdq*s
Hint: Python strings are immutable, but support string concatenation. Store and build the stronger password in the given password variable.
Solved 1 Answer
See More Answers for FREE
Enhance your learning with StudyX
Receive support from our dedicated community users and experts
See up to 20 answers per week for free
Experience reliable customer service
Table of contents: tTyped code tCode screenshot tSample output     Typed code   # create a mapping for the characters and their cooresponding strong characters strong_chars = {'i': '!', 'a': '@', 'm': 'M', 'B': '8', 'o': '.'} # ask user for input password input_password = input("Enter your password: ") # initialize output password with an empty string output_password = "" # loop through each character in the input password for char in input_password: # if the character is in the strong_chars dictionary if char in strong_chars: # add the corresponding strong character to the output password output_password += strong_chars[char] # otherwise, add the character to the output password else: output_password += char # append "q*s" to the end of the output password output_password += "q*s" # print the output password print("nStrong password is:", output_password)       Code screenshot   1 # create a mapping for the characters and their cooresponding strong characters# ask user for input passwordinput_password = input("Enter your password: ")# initialize output password with an empty stringoutput_password = " "# loop through each character in the input passwordfor char in input_password:# if the character is in the strong_chars dictionaryif char in strong_chars:# add the corresponding strong character to the output passwordoutput_password += strong_chars[char]# otherwise, add the character to the output passwordelse:output_password += char# append " q \star S " to the end of the output passwordoutput_password +=" q \star s "# print the output passwordprint("\nStrong password is:", output_password)     Sample output   (base) /projects/chegg/471 $ python main.pyEnter your password: mypasswordStrong password is: Mypassw.rdq*s       Let me know if I can help you more with this :) And don't forget to upvote if you like the answer.   ...