October 2004
Intermediate to advanced
336 pages
6h 27m
English
This function calculates averages from a file containing student test results.
The file contains sections in the following format:
testname: maximumscore studentname1 score1 studentname2 score2
The "testname" line indicates the start of a new section. (Note that those lines have a colon (:) in them, while score lines do not.)
In the file, testname and studentname must be a single word, and the scores must be numeric.
A student does not necessarily have a score for each test. If the line is missing, it indicates that the student did not take the test.
When the program is done processing the file, for each student, ...
Read now
Unlock full access