Ceasar Cipher
From the 2014 board-wide contest.
Download the datafiles here.
Extra Challenge
Extra Challenge
- Task 1) Write a program named cc_write.py that creates and saves an encrypted file named cc.txt. In the program, prompt for the string you want encrypted and number of characters you want the letters shifted by.
- Task 2) Write a program named cc_read.py that reads cc.txt and auto-decodes the text based on the frequency of the letters with E being most common. Compare the "words found" with the contents of cleandict.txt (attached) to see if the decryption was correct. If not, use different shift values until all your found words are in the dictionary file. When reading the file, include a Try/Except section to test whether the file exists and to output a suitable error message if it does not.
- chunk the code with suitable comments for each sub-section.
- create functions where suitable