Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

4. Does cultural aptitude impact ones emotional intelligence?

Answered: 1 week ago