Docsity

Algorithm for Calculating Weighted Average of Four Test Scores, Exercises of Programming Languages

Toggle sidebar
bg1
Design an algorithm to find the weighted average of four test scores. The four test scores and
their respective weights are given in the following format:
test score 30, 25, 20, 25
weightTestScore 35% , 25% , 15% , 25%
โ— Step1. Read the score of each test
โ— Step2. Read the weight of each test
โ— Step3. Multiply each test score by its respective weight (testscore1 * weight1).
โ— Step4. Get the of the results you got in step 3 ((testscore1 * weight1) +(testscore2 *
weight2) etc)
โ— Step5. Divide the sum you calculated in step three by 4 ( the number of tests)

Partial preview of the text

Download Algorithm for Calculating Weighted Average of Four Test Scores and more Exercises Programming Languages in PDF only on Docsity!

Design an algorithm to find the weighted average of four test scores. The four test scores and their respective weights are given in the following format: test score 30, 25, 20, 25 weightTestScore 35% , 25% , 15% , 25% โ— Step1. Read the score of each test โ— Step2. Read the weight of each test โ— Step3. Multiply each test score by its respective weight (testscore1 * weight1). โ— Step4. Get the of the results you got in step 3 ((testscore1 * weight1) +(testscore2 * weight2) etc) โ— Step5. Divide the sum you calculated in step three by 4 ( the number of tests)