hwkPerl1

  < Previous  Next >

Due Date

See the calendar for due date.

Description:

For this assignment write the following Perl programs:
  1. A program that prints out your name. Name it hello.pl
  2. A program (data.pl) that prints out the following statistics about the numbers in data.dat:
    1. Smallest value
    2. Largest value
    3. Sum of all of the values
    4. The 1,000,000th value
    5. The median data value
    Include data.dat in your submission.
  3. A program (age.pl) that calls a subroutine to calculate how many months the user has lived. The subroutine takes four parameters:
    1. The user's birth year
    2. The user's birth month
    3. Today's year (feel free to hardcode it)
    4. Today's month (feel free to hardcode it)
    This script must ask the user for and use the year and month they were born. A prompt needs to be given to the user, specifying what to enter (including format if it's not obvious).
  4. A program (hash.pl) that determines the occurrences of each of the words in Threshold Average Precision (TAP-k): A Measure of Retrieval Designed for Bioinformatics. Display the words in alphabetical order and the number of occurrences. (HINT: Use a hash). Include thresholdAveragePrecision.txt in your submission.
Alternatively, you can write each part as an appropriately named subroutine instead of a separate program.
Add comments before subroutines, major portions of your code, etc. Good programming style is to start with JUST comments, then go back and add it the code.
Perl script(s) need to be able to run on herschel by your instructor's account.
Make a bash script, runAll.sh that executes your Perl script(s).

Rubric:

Points       Item
-----------  --------------------------------------------------------------
_____ /  2   name.pl / name()
_____ / 12   data.pl / data()
_____ /  6   age.pl / age()
_____ / 24   hash.pl / hash()
_____ / 10   Comments in code
_____ /  4   Report (detailing any troubles and a completed rubric)

_____ / 58  Total

_____  Approximate number of hours spent
      

Submission

Compress your bash and Perl scripts and report with either tar or zip and submit your compressed file into the appropriate folder in the dropbox for COMS 6100 at https://elearn.mtsu.edu. To make a tarball, do something like the following:
tar -czf hwkPerl1-USER.tar.gz  hwkPerl1-USER/
To use zip, do something like the following:
zip -r hwkPerl1-USER.zip  hwkPerl1-USER/