Question
In python create a code that will decrypt a Caesar encrypted message without a decryption key. This is what I have. I need it to
In python create a code that will decrypt a Caesar encrypted message without a decryption key.
This is what I have. I need it to only include letters in the decryption process. It is including symbols and numbers. That is what I DO NOT need to happen.
def caesar_decrypt():
word = input('Enter the cipher text: ')
c = ''
for i in word:
if (i == ' '):
c += ' '
else:
c += (chr(ord(i) - 10))
return c
decipher = caesar_decrypt()
print("Decrypted text :",decipher)
Example:
Enter the cipher text: UXENRBWXCUXENFQRLQJUCNABFQNWRCJUCNAJCRXWORWMB Decrypted text : KN;DH8MN9KN;D
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started