Question

4.16 LAB: Password modifier Many user-created passwords are simple and easy to guess. Write a program...

4.16 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: 

Mypassw.rdq*s 

Hint: Python strings are immutable, but support string concatenation. Store and build the stronger password in the given password variable. 

3 1
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1
word = input()
password = ''

for x in word:
    if(x=='i'):
        password+="!"
    elif(x=='a'):
        password += "@"
    elif (x == 'm'):
        password += "M"
    elif (x == 'B'):
        password += "8"
    elif (x == 'o'):
        password += "."
    else:
        password += x
password += "q*s"
print(password)

Add a comment
Know the answer?
Add Answer to:
4.16 LAB: Password modifier Many user-created passwords are simple and easy to guess. Write a program...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • **IN JAVA** Many user-created passwords are simple and easy to guess. Write a program that takes...

    **IN JAVA** 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: [email protected]*s

  • Write a password cracker program for the passwords created according to the policy outlined in assignment...

    Write a password cracker program for the passwords created according to the policy outlined in assignment 15 (exactly 8 characters: 5 letters and 3 digits). You are to write a function that takes one parameter that is a hash of a password and should return a possible password (a string) that has the same hash. Use python secure hash function sha1 from hashlib module. Hint: brute force method will be more than adequate to the task.   Please I need it...

  • For this lab you will write a Java program that plays a simple Guess The Word...

    For this lab you will write a Java program that plays a simple Guess The Word game. The program will prompt the user to enter the name of a file containing a list of words. These words mustbe stored in an ArrayList, and the program will not know how many words are in the file before it starts putting them in the list. When all of the words have been read from the file, the program randomly chooses one word...

  • This project will use The Vigenere Cipher to encrypt passwords. Simple letter substitution ciphers are ones...

    This project will use The Vigenere Cipher to encrypt passwords. Simple letter substitution ciphers are ones in which one letter is substituted for another. Although their output looks impossible to read, they are easy to break because the relative frequencies of English letters are known. The Vigenere cipher improves upon this. They require a key word and the plain text to be encrypted. Create a Java application that uses: decision constructs looping constructs basic operations on an ArrayList of objects...

  • In python, write the following program, high school question, please keep simple. When I submitted the...

    In python, write the following program, high school question, please keep simple. When I submitted the solution, I get an error as 'wrong answer'. Please note below the question and then the solution with compiler errors. 7.2 Code Practice: Question 2 Instructions Write a program to generate passwords. The program should ask the user for a phrase and number, and then create the password based on our special algorithm. The algorithm to create the password is as follows: If the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT