Ask Question
11 June, 09:08

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

+5
Answers (1)
  1. 11 June, 09:18
    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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers