1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alja [10]
3 years ago
8

g You need to create a program that will read the scores from the CSV file, pass the scores as a list to the finalGrade function

, and display the resulting final grade, along with the student's name. The input files are attached and the function finalGrade is given. You can assume that the same number of lines will be in the input files. Display the name and final grade for all students in the following format: Bill Gates earned 81.5% Mark Zuckerberg earned 99.6% ...

Computers and Technology
1 answer:
Goshia [24]3 years ago
6 0

Answer:

def finalGrade(scoresList):

""" Function that finds the final grade """

hw1_weighted = float(scoresList[0])/10 * 0.05

hw2_weighted = float(scoresList[1])/10 * 0.05

mid_weighted = float(scoresList[2])/100 * 0.40

fin_weighted = float(scoresList[3])/100 * 0.50

final_grade = (hw1_weighted + hw2_weighted + mid_weighted + fin_weighted) * 100

return final_grade

if __name__ == '__main__':

''' Reading and processing scores '''

# Reading names from text file

names = []

# Opening text file

with open("d:\\Python\\names.txt", "r") as fp:

# Reading data

for line in fp:

# Stripping new line

line = line.strip()

# Adding to list

names.append(line)

# Reading scores

finalGrades = []

# Reading scores

with open("d:\\Python\\scores.csv", "r") as fp:

# Reading data

for line in fp:

# Stripping new line

line = line.strip()

# Scores list

scores = []

# Iterating over scores

for score in line.split(','):

# Adding to list

scores.append(score)

# Finding grade

grade = finalGrade(scores)

# Adding to list

finalGrades.append(grade)

# Printing result

for i in range(len(names)):

print("\n%s earned %.1f%%"%(names[i], finalGrades[i]))

Explanation:

This program was implemented with python programming language.

This program will read the scores from the CSV file, pass the scores as a list to the finalGrade function, and display the resulting final grade, along with the student's name.

See attachment for screenshots

You might be interested in
Just answer in five-line. Question:
Eddi Din [679]

Answer:

It is a half-duplex serial transmission mode, and this can be provided through the RS-485 two wired electrical interface. And this can be connected to the ethernet if required, connect to the LAN, and finally transmitting the video footage to all the screens. And the two reasons are:

1. Noiseless

2. Allows around 32 receivers.

Explanation:

Please check the answer.

3 0
3 years ago
What is the difference between auto fill and fill handle ?​
lidiya [134]

Answer:

  • Auto fill a software function that automatically completes data (like the data that has been entered previously) without the user needing to type it in full.

  • The Fill Handle is a feature in Excel that fills the data automatically with a specific pattern in your spreadsheet cell.

hope u liked the answer :)

7 0
3 years ago
"what windows process is responsible for authenticating users?"
Likurg_2 [28]
Lsass.exe /................................................
8 0
3 years ago
Use a spreadsheet to solve this business problem. The owners of an electronics store want to find which of their products makes
Tom [10]

Answer:

Computer Monitors earned him maximum profit. For details, please check the attachment.

Explanation:

Please check the attachment.

Download xlsx
5 0
4 years ago
1
raketka [301]

1

they were crafted in stained-glass art in religious buildings

2

puzzle games

3

motion-capture devices (e.g., Kinect, WiiMote

4

puzzle

simulation

5 0
3 years ago
Other questions:
  • Objects falling through air experience a type of friction called.. A.terminal velocity B.air resistance C.rolling friction
    8·1 answer
  • Jeremy wants to run a program file from the command prompt. Which of the following should Jeremy type in the command prompt wind
    8·2 answers
  • The software used to help run the computer hardware is the _____.
    9·2 answers
  • You insert a comment in a worksheet by using a command on the ____ tab on the Ribbon.
    13·1 answer
  • Suppose users share a 1-Gbps link. Also, suppose each user requires 200 Mbps when transmitting, but each user only transmits 30
    5·1 answer
  • Sharon must give an informative presentation to a group of teenagers about cultivating earthworms for use in home gardening. Whi
    11·2 answers
  • I still haven't figured out how to award someone branliest will someone help me? If you explain to me how to do it i will do awa
    14·1 answer
  • Many digital libraries have much more information than traditional libraries
    13·1 answer
  • Which of the following statements is/are correct? a. At the network layer, entitlement can map identity and/or attributes to fun
    8·1 answer
  • We call any device connected to the Internet a(n) ________. Group of answer choices router host IP client
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!