In: Computer Science
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
SOLUTION-
I have solve the problem in Python code with comments and
screenshot for easy understanding :)
CODE-
print("Hello User Enter The Simple Password")
simplepassword=input()
password=''
for x in simplepassword:
    if(x=='i'):
       
password+="!"         
# can also be written as: password=password+"!"
    elif(x=='a'):
       
password+="@"     # replaces a by @
    elif(x=='m'):
        password+="M" # replaces
m by M
    elif(x=='B'):
       
password+="8"     # replaces B by 8
    elif(x=='o'):
        password+="." # replaces
o by .
    else:
        password+=
x    # if the password does not contain i,a,m,B,o it
returns the entered password
password+="q*s"        
# it appends q*s at the end of the password
print("Stronger Password:")
print(password)         
# at the end prints the stronger password.
SCREENSHOT-

IF YOU HAVE ANY DOUBT PLEASE COMMENT DOWN BELOW I WILL
SOLVE IT FOR YOU:)
----------------PLEASE RATE THE ANSWER-----------THANK
YOU!!!!!!!!----------