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

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 students grades are recorded. However, some of the students enrolled have not yet paid their tuition.

1. If a student has paid the tuition, the grades are shown on the grade report together with the grade point average (GPA).
2. If a student has not paid the tuition, the grades are not printed. For these students, the grade report contains a message indicating that the grades have been held for nonpayment of the tuition. The grade report also shows the billing amount.

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

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 Programming Questions!