Question: Hogwarts needs a program to calculate their students grades. Wizardry can only do so much, and the supernatural task of grading is beyond their magical

Hogwarts needs a program to calculate their students grades. Wizardry can only do so much, and the supernatural task of grading is beyond their magical abilities.

I want you to create a program that will grade the students test scores and give a final average. You will read the data from an input file and write the results to an output file.

Copy the following three lines and paste them into your input file named student_data.txt. Your program will read in this data. The format for each line of the file is as follows : (students name, year, grade 1, grade 2, grade 3)

Harry 1 80 70 60

Draco 2 95 90 100

Luna 3 60 75 55

Calculate the average (your average should be a floating point value) and print everything to a file named averages.txt. Print Data written to averages.txt. to the console.

Correct Console Output:

Data written to averages.txt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!