In the Spotlight: Processing an Array Dr. LaClaire gives four exams during the semester in her chemistry class. At the end of the semester, she drops each student's lowest test score before averaging the scores. She has asked you to write a program that will read a student's four test scores as input, and calcu- late the average with the lowest score dropped. Here is the pseudocode algorithm that you developed: By using main function Read the student's four test scores. Calculate the total of the scores. Find the lowest score. Subtract the lowest score from the total. This gives the adjusted total. Divide the adjusted total by 3. This is the average. Display the average.
Added by Joseph K.
Close
Step 1
For this example, the scores are 0, 31.2, 15.1, and 57.9. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 66 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
This pseudocode segment is intended to compute and display the average grade of three tests for any number of students. The program executes until the user enters a negative value for the first test score. Debug the pseudocode by rewriting it to achieve its intended purpose. start Declarations num test1 num test2 num test3 num average housekeeping() while test1 >= 0 mainLoop() endwhile endOfJob() stop housekeeping() output "Enter score for test 1 or a negative number to quit" return mainLoop() output "Enter score for test 2" input test2 average = (test1 + test2 + test3) / 3 output "Average is ", average output "Enter score for test 1 or a negative number to quit" input test1 return endOfJob() output "End of program" return
Shelayah R.
Write a program that calls a function to pass an array of test scores of students and calculates the average test scores for each student. Let the user enter 2 students' test scores for three classes (use a two-dimensional array). Write another function to pass an array of test scores, display test scores, and average for each student. C++
Gio M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD