Answered step by step
Verified Expert Solution
Link Copied!

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).

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

Write down the circumstances in which you led.

Answered: 1 week ago