Photo AI

The diving competitions at the gala will be scored by five judges - Edexcel - GCSE Computer Science - Question 9 - 2021 - Paper 1

Question icon

Question 9

The-diving-competitions-at-the-gala-will-be-scored-by-five-judges-Edexcel-GCSE Computer Science-Question 9-2021-Paper 1.png

The diving competitions at the gala will be scored by five judges. Each judge awards each dive a score between 0.0 and 10.0. The highest and lowest of the judges' sc... show full transcript

Worked Solution & Example Answer:The diving competitions at the gala will be scored by five judges - Edexcel - GCSE Computer Science - Question 9 - 2021 - Paper 1

Step 1

ARRAY scores

96%

114 rated

Answer

Initialize an array to hold the scores from the judges:

ARRAY scores
SET scores TO [8.9, 9.1, 8.2, 7.8, 8.1]
REAL inFactor

Step 2

Receive inFactor from input

99%

104 rated

Answer

Prompt the user to input the degree of difficulty factor:

RECEIVE inFactor FROM (REAL) KEYBOARD

Step 3

Find highest and lowest scores

96%

101 rated

Answer

Initialize variables to track the highest and lowest scores:

SET highest TO 0.0
SET lowest TO 10.0

Use a loop to determine the highest and lowest scores in the array.

Step 4

Calculate total score without highest and lowest

98%

120 rated

Answer

After identifying the highest and lowest scores, calculate the total of the three remaining judges' scores:

FOR index FROM 1 TO LENGTH(scores) DO
    IF scores[index] > highest THEN
        highest = scores[index]
    END IF

    IF scores[index] < lowest THEN
        lowest = scores[index]
    END IF
END FOR

Then sum the relevant scores.

Step 5

Calculate dive score

97%

117 rated

Answer

Finally, calculate the dive score using:

finalScore = totalScores * inFactor

Display the final score.

DISPLAY finalScore

Join the GCSE students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;