# Homework Assignment 4 (HW4) - Nested Loops

Homework Assignment 4 (HW4) - Nested Loops
Every term I have to transfer my paper grades to the final grade roster for the course. I type in a student name, then enter 4 different but equally weighted assignments. For each assignment a student can earn a score between 0 and 100--the program should NOT allow me to enter a score less than zero or greater than 100. If an incorrect grade is entered, the program should prompt me to re-enter the grade (hint: input checki

Homework Assignment 4 (HW4) - Nested Loops

I need a program that will let me input the grades and compute the average grade for the student. Hint: The outer loop should allow me to input the student name, and the inner loop should accept the student's 4 exam scores and compute the average for the student.

After I see the student's result (e.g. John Doe has an average of 86%.) I will enter the next student's name and scores--and continue this process until I run out of students. I will signify that there are no more students by entering a "Q" or "q" in place of the student name (sentinel).

Design the pseudocode and flowchart to get 4 grades for an undetermined number of students and compute the average for each student. The pseudocode should be in similar style and format as our textbook examples.

• Choose meaningful variable names and proper data types

• Include header and step commentsin your pseudocode, similar to the examples provided in section 2.3 (see examples 2.7 and 2.8 on pages 87-88.)

• Do not use modules yet!--we learn to use them when we get to chapter 7

• Do not modify the requirementsof the assignment!

• Desk check your program with the data from the sample runsbelow

• Test your program with the Online Pseudocode Tester--use the values from the sample run to ensure you get the same output!

You can create flowcharts using PowerPoint, OpenOffice/LibreOffice Impress, Keynote, etc. as they all have built in graphic shapes. Another alternative is a
LucidChart.com free account--just select Download As... to export your chart into a graphic format (.jpg, .png, etc.) This is what I use to create some of the flowcharts in the classroom. Worst case, I have had some students create the flowchart by hand and scan it in--just make sure your handwriting is legible!

Before attempting this assignment, be sure you have completed all of this weeks textbook and course module readings, participated in the weekly conferences, and thoroughly understand the examples throughout the chapter.

**** Your deliverables for the assignment are 1) the flowchart and 2) the plain text pseudocode file. Both of these should be attached to your assignment folder for this assignment. Your program outputs should look like the following sample outputs.

Sample Program Outputs:

Enter the student name (or Q to quit):
Jeff Beck
Enter the score for exam 1:
87
Enter the score for exam 2:
73
Enter the score for exam 3:
78
Enter the score for exam 4:
83
Jeff Beck has an average of 80.25%.

Enter the student name (or Q to quit):
David Gilmour
Enter the score for exam 1:
84
Enter the score for exam 2:
76
Enter the score for exam 3:
55
Enter the score for exam 4:
743
This score is invalid.
Enter the score for exam 4:
874
This score is invalid.
Enter the score for exam 4:
764
This score is invalid.
Enter the score for exam 4:
74
David Gilmour has an average of 72.25%.

Enter the student name (or Q to quit):
Angus Young
Enter the score for exam 1:
87
Enter the score for exam 2:
86
Enter the score for exam 3:
94
Enter the score for exam 4:
95
Angus Young has an average of 90.5%.

Enter the student name (or Q to quit):
Q
Thank you for using the Student Grade Calculator!

• Posted: 6 years ago
complete solution

Purchase the answer to view it

Save time and money!
Our teachers already did such homework, use it as a reference!