Compsci 101, Fall 2017, Data Transformation

Due: Tuesday, Oct. 3 by 11:59pm

10 points

The HOWTO page has more details on using files, modules, and rules about the specific transforms you will write. It includes suggested steps if you don't know how to get started with this assignment.

Data transformation plays a key role in many applications ranging from identifying audio/music files by transforming audio data into identifiable fingerprints, e.g., SoundHound or Shazam, to using DNA/genomic data to identify diseases to encryption and more. In this assignment, you will simply transformation strings to learn generally about transforming and un-transforming data as well as learning about interacting Python modules.

This paragraph has appeared for a while in places on the Internet, the video to the left debunks it. According to Researchers at Cambridge University (see, e.g., snopes for information):

Aoccdrnnig to rscheearch at Cmabrigde uinervtisy, it deosn't mttaer waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteres are at the rghit pclae. The rset can be a tatol mses and you can sitll raed it wouthit a porbelm. Tihs is bcuseae we do not raed ervey lteter by it slef but the wrod as a wlohe.

Alternatively, consider pig-latin. According to editors Lewis and Onuf, in the book Sally Hemings & Thomas Jefferson, Jefferson used pig-latin to code passages in his diary that he wanted "hidden", though others apparently disagree. Amazingly, Google will provide a pig-latin interface if you use this special URL.

 

Part 1: Pig-latin

In this part you will translate text to Pig-latin by reading a file, and then writing the piglatin translation to a new file. You'll then write code to read a file in pig-latin and translate it back to English.

Part 2: Caesar Cipher encryption and decryption

In this part you will read in a file and encrypt the file using the Caesar Cipher technique, writing the encrypted version of the text to a new file. You will also write several decrypt methods to translate the encrypted file back into an English file. Sometimes you will know the key to decrypt the file and other times you will need to break the encryption by determining the key.

Your Task

Snarf the files for assignment 4. The files include

You can also see the files here.

Requirements

To get full credit you must
  1. Put all your code for Part 1 in one Python module named PiglatinTransform.py and follow the requirements on the HOWTO page

  2. Put all your code for Part 2 in one Python module named CaesarTransform.py and follow the requirements on the HOWTO page
    Make sure this program encrypts a file, and does eyeball decryption and automatic decryption on the encrypted file. The output should clearly indicate these three parts.

  3. You must have a comment for each function you write describing what that function does, in addition to a comment at the top of the file with your name.


Submission