Programming Assignment 7
Writing code to crack the "code"
 

Due: Monday, March 26th  by 9AM

The Assignment

You have been given an encrypted copy of the Exam2 study guide here, but how do you decrypt and read it???

Along with the encrypted copy, some mysterious person has also given you the following documents:

helloworld.txt -- Maybe this file decrypts to say "Hello world!". Hmmm.

hints.txt -- Seems important.

In a file called pa07.py write a program that askes for two pieces of information: 1) the file to read, and 2) the file to write. Make sure to ask for the files in that order to get the most points.  The first input should be the name of an encoded file (either helloworld.txt or superdupertopsecretstudyguide.txt or yet another file that I might use to test your code).  The second should be the name of a file that you will use as an output file.  For example:

    Please enter the input file: superDuperTopSecretStudyGuide.txt

    Please enter the output file: translatedguide.txt

Your program should read in the contents of the inputfile and, using the scheme described in the hints.txt file above, decode the hidden message, writing to the outputfile as it goes (or all at once when it is done depending on what you decide to use).

Note: If you are in Windows, please read the textfiles in Wordpad (not Notepad).  I've converted the files to an encoding that is readable by both Windows and Mac machines.  Mac machines natively process newlines a little different than Windows machines, so if you open the file in Notepad, you'll notice it is all on one line.  That's ok -- Wordpad understands the encoding and will show you the file with the proper newlines inside.

Hint: The penny math lecture is here.


Submitting your assignment

To upload your homework for grading, log on to eLearning, select this class, and navigate to the "Assignment Submissions" area. Click on the "Programming Assignment 7" folder and upload the pa07.py file in its designated location.