Programming Exercise 17

  < Previous  Next >

Due Date

See the calendar for due date.

Assignment:

Write a program that creates a directory containing course numbers and information listed in the catalog. The directory should be structured as follows:
Number, Title, Hours
The program should create a list containing course numbers and listed information from a file. This file is structured so that each data item is on a single comma separated line and is contained in freshman.txt. The program should let the user enter a course number, and then it should list the title and credit hours; if the course is not in the directory, an appropriate error should be printed.

Examples

The following are examples of correct execution (with the text in bold being the input from the user):
Please enter a course number to search for: CSCI1010

Course: CSCI1010, Title: Computer Science Colloquium, Hours: 1
Please enter a course number to search for: CSCI4900

CSCI4900 not found in freshman.txt

Submission

Submit your python script using the handin program. For handin, for this lab, type the following in a terminal window exactly as it appears:
handin  pe17  pe17.py
To verify your submission, type the following in a terminal window:
handin  pe17