CSSE 120 -- Intro. to Software Development

Homework 5

  1. Follow the instructions in the previous homework assignment for installing and configuring Pydev and Eclipse.  Start early enough so you can get help from someone if you have trouble. We will be using Pydev in the next session.  If you do not have it installed, you will have to simply watch while the rest of us use it.
  2. Star graphics problem: See question 7 of the previous HW assignment for details.
  3. (30 pts) Decoding messages: Suppose you are a security agent who encrypts messages that you send to other agents.  Of course, the receiving agents need to be able to decode the encoded messages they receive from you.  Assuming that both you and the agents receiving your messages share a common key that you use to encode and decode messages, write a decode module in a file named decode.py that uses a common key to encode and decode messages.  Your decode module should be able to:
    1. Prompt the user for a list of numbers
    2. Prompt the user for a key
    3. Reverse the calculation of this encode module.  Note:  You may wish to consider using String's join method.  In IDLE type help(string.join) at the prompt after importing the string module.

    Submit your Python source file and the generated output to the decode Drop Box in the Homework 5 folder on ANGEL.

  4. (30 pts) Loops and string formatting: Storing information in files is a very important exercise for engineers running experiments that generate a large quantity of useful data.  The stored data can later be analyzed, categorized, and manipulated to allow engineers to draw useful conclusions.  For now, you will write the data to the screen; in a later exercise, you will actually write it to a file.

    Often, the generated data is formatted so that another program can automate the process of analyzing, categorizing, and manipulating the data. In this problem you are to write a program, funcDisplay.py, that implements the following design:

    Submit your Python source file and the generated output to the funcDisplay Drop Box in the Homework 5 folder on ANGEL.

  5. (10 pts) Challenge Problem: This problem is not required, but is an interesting extension that you might like to try.
    1. Create a version of funcDisplay.py that prompts the user to enter the function for column 2 instead of hard-coding the function.
  6. If you found this homework to be short, you can get a jump on next session's homework, which is a bit longer.
  7. Web links, bacon, eggs, and spam: One of today's in-class examples was a reference to the Penguin sketch. We hope you enjoy this four minute cultural experience!