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
Get step-by-step solutions from verified subject matter experts
