Lecture notes for the Introduction to Computer Science for non-majors by James Tam Return to the course web page

CPSC 217: Assignment 3 (Worth 3%)

Scoring

Score 12 11 10 9 8 7 6 5 4 3 2 0 - 1
Letter A A- B+ B B- C+ C C- D+ D D- F

 

New concepts to be applied for this assignment

Part 1: Fixing a program with syntax errors (8 marks)

In the Assignment 3 directory (/home/courses/217/assignments/assignment3) you will find a Python program in a UNIX text file called "broken.py".  Rename the file to "fixed.py" (2 marks).   Then make the three changes in the program (2 marks for each edit x 3 edits = 6 marks) to remove the syntax errors and allow the whole program to translate into machine language and execute. Aside from making the changes that will allow the program to compile you cannot otherwise change the program (i.e., you can't just simply write your own program instead of fixing the one that was provided).

Part 2: Simple text formatting (4 marks)

In the Assignment 3 directory (/home/courses/217/assignments/assignment3) you will find a Python program called 'converter.py' for which you are to make the following changes:

  1. Line 3: Insert a tab after displaying the message "Celsius temperature:" but before the actual temperature is displayed.
  2. Line 4: Insert a tab after displaying the message "Fahrenheit temperature:" but before the actual temperature is displayed.

Submission requirements

In addition to having fulfill the generic assignment requirements, the requirements specific to this assignment include:

 
  1. Include a README file in your submission:  For this assignment you need to include a file called 'README' which includes your contact information: your name, university identification number and UNIX login name so that your marker knows whose assignment that he or she is marking. 

 
  1. The programming assignments require a two part submission: a) A paper submission of your README file and Python program into the assignment drop boxes (second floor Math Sciences) b) An electronic submission (again of your README file and your Python program) as an email attachment (don't cut and paste it into the email body!) to the following people (failing to include everyone listed below may result in your assignment not being marked for credit so before submitting your assignment double check!) Make sure that the subject line of the email contains the exact text (don't add or delete anything to it or you will lose marks): CPSC 217 Assignment X.

X = The appropriate assignment number (e.g., for Assignment 3 the subject would be titled "CPSC 217 Assignment 3")

 
  1. The course instructor at the following email address: tamj@cpsc.ucalgary.ca
 
  1. Your tutorial instructor, the email addresses for the TA's can be found on the main course web page.
 
  1. The TA coordinating the marking of assignments: amaobied@ucalgary.ca (if you are in Ahmed's tutorial you don't have to send your assignment to him twice, other students must send their assignment both to their TA and to Ahmed).
 
  1. Yourself. Sending the assignment to yourself provides one last "double check" that you submitted your assignment properly (e.g., you sent it to all the right people, you attached all the important files to the submission etc.) When you receive the submitted assignment you can check one last time to make sure that you fulfilled all the requirements. If you forgot something then you can resend your assignment with a note to mark only the latest submission (but try not to resubmit your assignment too many times please).
 
  1. As a reminder, you are not allowed to work in groups for this class.   Copying the work of another student will be regarded as academic misconduct (cheating).  For additional details about what is and is not okay for this class please refer to the following link.
To help make sure that you haven't missed anything here is a checklist of items to be used in marking.
   

As a reminder, you are not allowed to work in groups for this class.   Copying the work of another student will be regarded as academic misconduct (cheating).  For additional details about what is and is not okay for this class please refer to the following link