Answer to Question #97226 in Python for yousif

Question #97226
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 users input word is less than 8 characters, output Password not long enough.
If the users input word is greater than or equal to 8 characters, do the following:
Replace es with @
Replace s or S with $
Replace t or T with +
Capitalize the word and add the number to the end.
Sample Run

Enter your word: zebras
Enter a number: 62
Password not long enough.

Enter your word: newyorkcity
Enter a number: 892
Password: N@wyorkci+y892
1
Expert's answer
2019-10-24T00:57:23-0400
Dear yousif, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Student1
26.03.20, 14:58

The code to Edhesive 7.2 Code Practice question 2 word = input("Enter a word: ") number = input ("Enter a number: ") if (len(word) < 8): print ("Password not long enough.") else: word = word.replace("e","@") word = word.replace("s","$") word = word.replace("S","$") word = word.replace("t","+") word = word.replace("T","+") word = word.capitalize() print ("Password: " + word + number)

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS