![5001Je](/avatars/29380.jpg)
5001Je
21.04.2020 •
Engineering
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
Solved
Show answers
More tips
- H Health and Medicine What to Take with You to the Maternity Hospital?...
- F Family and Home How to Choose the Perfect Air Conditioner for Your Life...
- H Health and Medicine Discover the Hidden Principles and Real Results of the Japanese Diet...
- H Health and Medicine Understanding Pregnancy Tests: What You Need to Know?...
- H Health and Medicine What Makes a Man a Man?...
- C Computers and Internet How to Get Rid of Spam in ICQ?...
- A Art and Culture Who Said The Less We Love a Woman, the More She Likes Us ?...
- F Family and Home How to Get Rid of Your Neighbors?...
- S Society and Politics How Could Nobody Know About the Dead Mountaineers?...
- H Health and Medicine How to Cure Adenoids?...
Answers on questions: Engineering
- E English One of tony hsieh’s most important roles now is to act as a cultural leader for zappos. using your knowledge of cultural leaders, which of the following would be the best...
- P Physics Unpolarized light is incident upon two polarization filters that do not have their transmission axes aligned. if 32 % of the light passes through this combination of filters,...
- P Physics Do students need summer development? for 108 randomly selected college applicants, the following frequency distribution for entrance exam scores was obtained. construct...
- M Mathematics The lower limit of a confidence interval at the 95% level of confidence for the population proportion if a sample of size 100 had 30 successes is: a. 0.3126 b. 0.3041 c....
- M Mathematics 15x – 24 3(4x – 10)solve using the addition and multiplication principle. one of these is the answer. {x | x ? -2} {x | x ? -2} {x | x -2} {x | x -2...
- P Physics A500-watt vacuum cleaner is plugged into a 120-volt outlet and used for 30 minutes. how much current runs through the vacuum? 900,000 amps 60,000 amps 4.2 amps 0.24 amps...
- E English Which statement explains the irony of harburg’s description of the bread line?...
- E English What tone does the author create by calling himself butterfly chaser, googly eyed bleeding heart and wild conservative ? apex...
- C Computers and Technology Description: write function lastfirst() that takes one argument—a list of strings of the format lastname, firstname —and returns a list consisting of two lists: (a) a list...
- P Physics What is the fastest time trial for the first quarter checkpoint? seconds what is the slowest time trial for the first quarter checkpoint? seconds what is the range of times...
Ответ:
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()
Ответ: