COMP1601: Computer Programming I
Assignment #2 Mark Scheme
Criteria Mark Allocation
A) Reading data from input file (until “END” is reached),
checking for players for the team specified by the user 8 3 – code, 5 – runs correctly
and writing data to country_batting_stats.txt.
B) Reading the data for each player from the 3 1 – code, 2 – runs correctly
country_batting_stats.txt file.
C) Producing a histogram of the batting statistics. 5 2 – code, 3 – runs correctly
D) Finding the player who scored the highest number of
runs and difference from V_Kohli as well as the player 7 3 – code, 4 – runs correctly
who scored the second highest number of runs.
E) Finding the player who scored the highest individual 3 1 – code, 2 – runs correctly
score and difference with BB_McCallum.
F) Finding the player who scored the least number of runs. 2 1 – code, 1 – runs correctly
G) Finding the player who scored the highest average 4 2 – code, 2 – runs correctly
number of runs.
H) Finding the total number of hundreds and fifties scored 2 1 – code, 1 – runs correctly
by the team.
I) Programming style (6):
● Appropriate variable names and data types
2
Proper alignment of code and good use of white
2
space
2
Appropriate error messages
Total Marks 40