I'm writing a program that is supposed to perform a Caesar cipher and decipher. I have written the cipher portion but am a little confused about the decipher program.My plan so far is to look at all 26 possible encryptions of the input string. Then, I will decide on which is "best" by using a letter frequency function. I guess Iknow what my plan is, but I'm lost when it comes to writing the code. Help!Here's my encipher code...def cipher(text, n):new_text=""for char in text:s1= ord(char)+nif char.isalpha():if s1> ord('z'):s1-= ord('z')+1-ord('a')new_text= new_text+ chr(s1)else:new_text= new_text+ charprint new_text


Are there any questions left?
New questions in the section Engineering
Sign up for the IQClass
Answers from experts with no ads!
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Made with love
This website uses cookies to make IQClass work for you. By using this site, you agree to our cookie policy

Pleased to see you again

IQClass unlocks the learning potential of every child
  • Master useful skills
  • Improve learning outcomes
  • Share your knowledge
Create an account
Sign in
Recover lost password
Or log in with

Create an account

IQClass unlocks the learning potential of every child
  • Master useful skills
  • Improve learning outcomes
  • Share your knowledge
Create an account
Sign Up
Or sign up with
By signing up, you agree to the Terms of use and Privacy policy.
Looking for an answer to a question you need help with?
you have баллов