Question: Write a function score(file, student, hwk) that opens the file with name file (use scores.csv, this is how excel file looks http://oi65.tinypic.com/25ja3rm.jpg). The function then
Write a function score(file, student, hwk) that opens the file with name file (use scores.csv, this is how excel file looks http://oi65.tinypic.com/25ja3rm.jpg). The function then returns the score the student had on the homework named hwk. You can assume that the homework names are in the very first line of the file (as they currently are), so you can search for them there (here, index() may be your friend).

5. (CSV, 10pt) Write a function score(file, student, hwk) that opens the file with name file (use scores.csv, which we saw in class). The function then returns the score the student had on the homework named hwk. You can assume that the homework names are in the very first line of the file (as they currently are), so you can search for them there (here, index() may be your friend). Python 3.43 Shell Eile Edit Shell Debug Options Window Help score ('scores.csv', 'Abbott,'hw1') student not found >>> score ( ' scores. csv ' , ' Edmonds ' , ' hw1' ) 87 >score ('scores.csv'Edmonds, 'hw12') no such column >>>Score (scores.csv 'Edmonds,'hw8) 96 577 Ln:1938 Col4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
