Processing a CSV download.
The results of three unit assessments for a course can be downloaded from an examining body website in CSV format. The data in `grade book.txt` is formatted as: forename, surname, unit 1 result, unit 2 result, unit 3 result. This program reads the data and outputs the results from a chosen unit.
Raghu,Aleksandra,78,63,0
Michelle,Chase,34,56,0
Max,Clayton,89,88,0
Selene,Dipti,79,82,0
Damon,Smith,56,63,0
Helen,Sorina,90,90,0
Briana,Takehiko,76,87,0
Write a program that asks the user which unit to output the results for. The program then outputs the name of each student and the result they achieved in that unit.
Use this boilerplate code as a starting point:
Remember to add a comment before a subprogram, selection or iteration statement to explain its purpose.
Which unit do you want to output the results for? :1
Raghu Aleksandra: 78
Michelle Chase: 34
Max Clayton: 89
Selene Dipti: 79
Damon Smith: 56
Helen Sorina: 90
Briana Takehiko: 76
Which unit do you want to output the results for? :2
Raghu Aleksandra: 63
Michelle Chase: 56
Max Clayton: 88
Selene Dipti: 82
Damon Smith: 63
Helen Sorina: 90
Briana Takehiko: 87
Which unit do you want to output the results for? :3
Raghu Aleksandra: 0
Michelle Chase: 0
Max Clayton: 0
Selene Dipti: 0
Damon Smith: 0
Helen Sorina: 0
Briana Takehiko: 0
Use these resources as a reference to help you meet the success criteria.
Run the unit tests below to check that your program has met the success criteria.
Which unit do you want to output the results for? :1
Raghu Aleksandra: 78
Michelle Chase: 34
Max Clayton: 89
Selene Dipti: 79
Damon Smith: 56
Helen Sorina: 90
Briana Takehiko: 76
Which unit do you want to output the results for? :2
Raghu Aleksandra: 63
Michelle Chase: 56
Max Clayton: 88
Selene Dipti: 82
Damon Smith: 63
Helen Sorina: 90
Briana Takehiko: 87
Which unit do you want to output the results for? :3
Raghu Aleksandra: 0
Michelle Chase: 0
Max Clayton: 0
Selene Dipti: 0
Damon Smith: 0
Helen Sorina: 0
Briana Takehiko: 0
Check that you have: