Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 Col4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started