Question: python program to Compute a letter grade for each student based on data in a file. A file ( input.txt ) has student entries of

python program to Compute a letter grade for each student based on data in a file.

A file (input.txt) has student entries of the form (lastname-firstname-score-totalpoints)

Doe-John-100-100

Doe-Jane-85-100

Smith-Andrew-75-100

Winglow-James-60-100

Read in this file and compute the percentage points scored, and convert it to a letter grade as follows:

> 90%, A

>= 80% but <90%, B

>= 70% but <80%, C

<70%,F

Write the resulting rows to a new file (output.txt) with the form:

Doe-John-100-100-A

Doe-Jane-85-100-B

Smith-Andrew-75-100-C

Winglow-James-60-100-F

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!