In Python Prompt the user for a text file that contains a list of student names, one on each line. Also prompt the user for a CSV file that contains scores for the students in the following order: homework1, homework2, midterm exam, final exam. Each line in the CSV has four scores, delimited by a comma. Each name in the text file has the corresponding scores in the CSV file. You will need to calculate the weighted final grade for each student as follows: 5% homework1 5% homework2 40% midterm exam 50% final exam Homework is scored out of 10 points and exams are scored out of 100 points. You need to create a program that will read the scores from the CSV file, calculate the weighted final grade, and display the resulting final grade, along with the student's name. Sample input files are attached. You can assume that the same number of lines will be in the input files, and that the order of the names and corresponding grades is the same in the two files. Display the name and final grade for all students in the following format: Bill Gates earned 81.5% Mark Zuckerberg earned 99.6%

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

In Python

Prompt the user for a text file that contains a list of student names, one on each line. Also prompt the user for a CSV file that contains scores for the students in the following order: homework1, homework2, midterm exam, final exam. Each line in the CSV has four scores, delimited by a comma. Each name in the text file has the corresponding scores in the CSV file.

You will need to calculate the weighted final grade for each student as follows:

  • 5% homework1
  • 5% homework2
  • 40% midterm exam
  • 50% final exam

Homework is scored out of 10 points and exams are scored out of 100 points.

You need to create a program that will read the scores from the CSV file, calculate the weighted final grade, and display the resulting final grade, along with the student's name.

Sample input files are attached.

You can assume that the same number of lines will be in the input files, and that the order of the names and corresponding grades is the same in the two files.

Display the name and final grade for all students in the following format:

Bill Gates earned 81.5%

Mark Zuckerberg earned 99.6%

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT