Question
Follow the instructions below carefully: Open these files in a program and append the files into parallel lists. When you append them into lists, strip
Follow the instructions below carefully:
Open these files in a program and append the files into parallel lists. When you append them into lists, strip the newline character from the students and convert the grade to a float.
When you convert the grade to a float, note that it will automatically remove the newline character.
After you create the lists, you may want to make copies of the lists to keep the originals, if needed. Once the data is in the list you will use list code to show the top 5 grades with the students who got these grades, the lowest grade on the exam, the average grade for the students, the percent of students above the average grade. See the screenshot (Figure 1) below for output.
Looping through the lists will aid you in getting this output. These are the top 5 student grades, so if you look at the picture above, there are six students listed. Thus, you need to make sure you check to see if more than one student has the last top grade.
Make sure you close all files prior to ending the program.
Put the program in a main function.
Have a value-returning function to append the student names in the file to a list.
Have a value-returning function to append the grades to a grade list.
Have a void function to get the top five student grades.
Have a value-returning function for calculating averages.
Have a void function for the last 3 lines of output.
Make sure you code this program so it can be used with other files that may have more or less students. This means, do not use constants for calculations and loops, but the length of the lists.
Top Five Students and Scores Andrew Reinhart: 100.00 Clyde Miller: 98.50 Dominic Bursa: 95.50 Matilda Jones: 94.00 Justin Kear: 94.00 Alicia Krupp: 94.00 The lowest grade on the exam was: 45.50 The average score on the exam was: 85.03 The percentage of students who scored above the average is: 60.08
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