Question: In Ceaser Cipher, every character in the text is shifted by a specific single key then in the decryption face it reverses the shift happened.

In Ceaser Cipher, every character in the text is shifted by a specific single key then in the decryption face it reverses the shift happened.
Example
Text before encryption: abc
Key=2
Text after encryption: cde
Task
Write a python code for a program to crack the Ceaser Cipher without a key. In case the decrypted text (sentence) is not in the English corpus, print Not found with the same spelling.
Sample
Input
ecv
Output
cat
Hints:
1.You can try the keys from 1 to 25. Take into consideration the "wrap-around" (in case of shifting z by one it should be a).
2.You can check the words of the output of every key trial in the English corpus using nltk library, but for this submission use {cat, car, apple, banana, want, eat, to, go, this, the, a, an, school}.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!