Question

In: Computer Science

It’s not easy to come up with a secure password that one can actually remember. One...

It’s not easy
to come up with a secure password that one can actually remember. One of the
methods proposed is to take a line of text and take first letter of each word to form
a password. An extra step is substitute ”o” with 0, ”a” with ”@”, and ”l” with


1. For instance, using ”Come to the meadow on law street” would yield
”Cttm01s”. Write a program that asks the user to enter a phrase and outputs
the password that is generated using these rules.


You can assume that the words in the phrase will be separated by a single space or
a common punctuation sign such as ”.,?!;:” followed by a space.

PYTHON PLEASE! THANK YOU

Solutions

Expert Solution

#source code:

password=input("Enter the password:")
list=password.split(" ")
password_text=""
new_password=""
for i in range(len(list)):
   for j in range(len(list[i])):
       if(j==0):
           if(list[i][j]=="o"):
               password_text+=str(0)
               new_password+=str(0)
           elif(list[i][j]=="a"):
               password_text+="@"
               new_password+="@"
           elif(list[i][j]=="l"):
               password_text+=str(1)
               new_password+=str(1)
           elif(list[i][j]!="o" or "a" or "l"):
               password_text+=list[i][j]
               new_password+=list[i][j]
       else:
           new_password+=list[i][j]
   new_password+=" "
print(password_text)
print(new_password)

#output:

#if you have any doubts comment below...


Related Solutions

Generating secure password that you can remember, lab2pr0.py It’s not easy to come up with a...
Generating secure password that you can remember, lab2pr0.py It’s not easy to come up with a secure password that one can actually remember. One of the methods proposed is to take a line of text and take first letter of each word to form a password. An extra step is substitute ”o” with 0, ”a” with ”@”, and ”l” with 1. For instance, using ”Cookies and Code, let’s meet on Tuesdays” would yield ”C@C,1m0T”. Write a program that asks the...
One of the benefits of a linear regression model, is that it’s relatively easy to create...
One of the benefits of a linear regression model, is that it’s relatively easy to create a confidence interval on the mean response. Imagine you created a linear regression model from a dataset with n = 12, that applies over the range 0.0 ≤ x ≤ 10.0, where the mean value of x = 5.0 , the fitted model is Y = 74 + 15 x, Sxx = 0.75, and σ2. = 1.5 At what value of x does the...
You need to make up a password which contains 6 digits, which can be one of...
You need to make up a password which contains 6 digits, which can be one of 26 letters, 10 numbers (0-9) or 10 punctuation marks (!.,%$#*&=+). The first digit of the password must be a letter, and the last digit must also be a letter. There are no other restrictions. How many possible passwords are there?
JAVA PROGRAMMING project 1: Businesses want phone numbers that are easy to remember, and one that...
JAVA PROGRAMMING project 1: Businesses want phone numbers that are easy to remember, and one that can be tied to a phone number are even better. Given the “standard international keypad”, write anaysis and design to determine the phone number based on a user-supplied 7-letter phrase. 1 2 ABC 3 DEF 4 GHI 5 JKL 6 MNO 7 PQRS 8 TUV 9 WXYZ * 0 # Test cases: ● BadDogs ● GoodCat ● Glasses ● EatGood ------------------------------------------------------------------------------------------------------------------------ I ONLY NEED...
How can we come up with the numbers for the Benefits / Disbenefit / and Cost?...
How can we come up with the numbers for the Benefits / Disbenefit / and Cost? of these topics for Covid-19 Wash Hands: $ Benefits, and $ Cost Avoid Close Contact: $ Benefits, and $ Cost Wearing Mask: $ Benefits, and $ Cost Hand sanatizers: $ Benefits, and $ Cost Monitor Your Health: $ Benefits, and $ Cost Medical Health Care: $ Benefits, and $ Cost Vaccination: $ Benefits, and $ Cost Please Help me out, I can't seem to...
can you come up with 10 examples of sentences with deductive reasoning,
can you come up with 10 examples of sentences with deductive reasoning,
What is a prophet? Come up with one of your own in a sentence or two....
What is a prophet? Come up with one of your own in a sentence or two. In addition to your definition of a prophet, what is it that makes the figure you chose prophetic , and how does his/her story reflect a social justice principle or principles? What is that moves this person to act and speak?
what are the modern impacts of the industrial revolution. ^^^^ can someone please come up with...
what are the modern impacts of the industrial revolution. ^^^^ can someone please come up with the thesis to argue for my essay please.
what business we can relate to and come up with a news presentation on firms in...
what business we can relate to and come up with a news presentation on firms in competitive markets
Come up with your own example of one dependent and one compound event. Give specific numbers....
Come up with your own example of one dependent and one compound event. Give specific numbers. Do not calculate probabilities. Just site the event.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT