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, 22.06.2019 04:30
There is a simple pattern for determining if a binary number is odd. what is it and why does this pattern occur? how many bits would you need if you wanted to have the ability to count up to 1000? how high could you count in binary if you used all 10 of your fingers as bits? (finger up means 1, finger down means 0)
Answers: 3
question
Computers and Technology, 23.06.2019 12:30
Animations and transitions are added from the
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
What is a programming method that provides for interactive modules to a website?
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Create a file called favorite_foods, and list your favorite foods, entering five or six or more. press enter after each favorite food so it appears on its own line (make certain you also press enter after the final food item). after the file is created, add two more foods you like that are not on the list (press enter after the final food item). view the list of foods to make certain the two items you added appear at the end of the list
Answers: 2
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, 08.02.2021 23:50
question
Mathematics, 08.02.2021 23:50
question
Biology, 08.02.2021 23:50
question
Chemistry, 08.02.2021 23:50
question
Mathematics, 08.02.2021 23:50
Questions on the website: 13722363