Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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.

When you code these programs make sure you use proper variable naming. Make sure all variables are declared locally in their respective functions. We use the naming convention of variables where, if the variable name is one word, it is all lowercase. If the variable name is more than one word, the first word is lowercase, and all other words start with a capital letter. Remember, there can be no spaces in a variable name, and we will not be using the underscore separating words in variable names. Constant variables are in all capital letters and are used for variables that are constant throughout a program. Functions will also follow this naming convention.

Have comments for the program. There should be a minimum of one comment to state what the program does, one section comment at the beginning of each function to state the nature of the function, and line comments explaining major calculations in the program.

Please make sure you complete your own work. There is no possible way two people can create the exact same program code. Remember, if you share your files both the student who submitted another student's file and the person who gave the file to that student will get a zero (0) on the assignment.

Grades.txt

100.00 67.50 56.75 98.50 80.50 83.50 82.75 91.25 94.00 95.50 77.50 88.75 85.25 92.00 93.75 79.50 88.50 82.25 81.25 86.50 94.00 93.00 94.00 45.50 93.75

Students.txt

Andrew Reinhart Lori Hite Peter Hamilton Clyde Miller Darla Klempert Donna Zoeller Rascal Fritz Hunter Manner Matilda Jones Dominic Bursa Helen James Mary Hunter Marion Ro Joan Lucius Joseph Hartzell Agnes Reiter Tony Somers Robert Sams Adam Hope Jenny Grimes Justin Kear Ambrose Brickner Alicia Krupp Logan Lincoln Sam Broka

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

Students also viewed these Databases questions

Question

Prepare an employment application.

Answered: 1 week ago

Question

Describe the five elements of the listening process.

Answered: 1 week ago