subject

Write two methods: encrypt and decrypt. encrypt should #take as input a string, and return an encrypted version #of it according to the rules above. # #to encrypt the string, you would: # # - convert the string to uppercase. # - replace all js with is. # - remove all non-letter characters. # - add an x to the end if the length if odd. # - break the string into character pairs. # - replace the second letter of any same-character # pair with x (e. g. ll -> lx). # - encrypt it. # #decrypt should, in turn, take as input a string and #return the unencrypted version, just undoing the last #step. you don't need to worry about js and is, duplicate #letters, or odd numbers of characters in decrypt. # #for example: # # encrypt("ps. hello, world") -> "qlgrqtvzibtyqz" # decrypt("qlgrqtvzibtyqz") -> "pshelxoworldsx" # #hint: you might find it easier if you implement some # functions, like a find_letter function that #returns the row and column of a letter in the cipher.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:00
As with any small island country, cuba has fewer natural resources than countries such as brazil. this affects their economy in that cuba a) exports only manufactured products. b) exports more products than it imports.. c) must import more products than it exports. d) has imposed trade barriers against the united states.
Answers: 3
question
Computers and Technology, 23.06.2019 07:00
What are three software programs for mobile computing?
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Name the range function that would generate the following list of integers values: 0,1,2,3,4,5.
Answers: 1
question
Computers and Technology, 23.06.2019 10:30
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
Answers: 1
You know the right answer?
Write two methods: encrypt and decrypt. encrypt should #take as input a string, and return an encry...
Questions
question
Mathematics, 19.03.2021 05:40
question
Mathematics, 19.03.2021 05:40
question
Biology, 19.03.2021 05:40
question
Mathematics, 19.03.2021 05:40
Questions on the website: 13722367