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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started