Question
In Python Code The mid-semester point at your local university is approaching. The registrars office wants to prepare the grade reports as soon as the
The mid-semester point at your local university is approaching. The registrars office wants to prepare the grade reports as soon as the students grades are recorded. However, some of the students enrolled have not yet paid their tuition.
The input data is stored in a file in the following form:
studentsEnrollestuitionRatePerHour
studentName studentID isTuitionPaidnumberOfCourses
courseName courseNumber creditHours grade
courseName courseNumber creditHours grade
.
.
.
studentName studentID isTuitionPaidnumberOfCourses
courseName courseNumber creditHours grade
courseName courseNumber creditHours grade
.
.
.
The first line indicates the number of students enrolled and the tuition rate per credit hour. The students data (Student name contains only first and last name) is given thereafter. A sample input file is as follows:
3 145
Lisa Miller 890238 Y 4
Mathematics MTH345 4 A
Physics PHY357 3B
ComputerSci CSC478 3 B
History HIS356 3 A
.
.
.
The first line indicates that the input file contains three students data, and the tuition rate is $145 per credit hour. Next, the course data for student Lisa Miller is given: Lisa Millers ID is 890238, she has paid the tuition, and she is taking four courses. The course number for the mathematics class she is taking is MTH345, the course has four credit hours, her mid-semester grade is A, and so on. The desired output for each student is in the following form:
Student Name: Lisa Miller
Student ID: 890238
Number of courses enrolled: 4
Course No Course Name Credits Grade
CSC478 ComputerSci 3 B
HIS356 History 3 A
MTH345 Mathematics 4 A
PHY357 Physics 3 B
Total number of credits: 13
Mid-Semester GPA: 3.54
It is clear from this output that the courses must be ordered according to the course number. To calculate the GPA, we assume that the grade A is equivalent to four points, B is equivalent to three points, C is equivalent to two points, D is equivalent to one point, and F is equivalent to zero points.
Input A file containing the data in the form given previously. For easy reference, let us assume that the name of the input file is stData.txt. If you wish to an excel file instead of the text file, you could do so.
Output A file containing the output in the form given previously.
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