Ask Question
14 May, 08:50

16.44 Lab 13D: Student Scores with Files and Functions Overview Create a program that reads from multiple input files and calls a user-defined function. Objectives Gain familiarity with CSV files Perform calculations with data from CSV files Create a user-defined function Read from multiple files in the same program

+3
Answers (1)
  1. 14 May, 09:37
    0
    See Explaination

    Explanation:

    # copy the function you have this is just for my convenniece

    def finalGrade (scoresList):

    weights = [0.05, 0.05, 0.40, 0.50]

    grade = 0

    for i in range (len (scoresList)):

    grade + = float (scoresList[i]) * weights[i]

    return grade

    import csv

    def main ():

    with open ('something. csv', newline='') as csvfile:

    spamreader = csv. reader (csvfile, delimiter=',', quotechar='|')

    file = open ('something. txt')

    for row in spamreader:

    student = file. readline (). strip ()

    scores = row

    print (student, finalGrade (scores))

    if __name__ = = "__main__":

    main ()
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “16.44 Lab 13D: Student Scores with Files and Functions Overview Create a program that reads from multiple input files and calls a ...” in 📘 Engineering if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers