Question: Create a file in your project with the name GradeCalculator.py and write some code that will allow you to process a file containing student data.
Create a file in your project with the name GradeCalculator.py and write some code that will allow you to process a file containing student data. Your code should open a file with the name data.txt read in the contents, and process the data. The format for the file is as follows.
First,Last,IDMajor,gggggggggg
All values are comma separated. The first two represent the first and last name of a student which are strings. The third is the ID of the student, which is an int. The fourth value is the students major, which is a string. The ten remaining values on the line are all integers that represent the grades that the student has received on ten different assignments.
Your script should calculate an average grade for each student and create a dictionary to associate each student you should use the ID of the student as the key with the letter grade that they have received, based on their average grade. You should use the typical scale where and above is an A up to is a B and so on
You can download the data.txt file from Blackboard and place it in your project folder to use as input.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
