Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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