Photo AI

Figure 9 shows an algorithm, represented in pseudo-code, to display students' test scores - AQA - GCSE Computer Science - Question 10 - 2023 - Paper 1

Question icon

Question 10

Figure-9-shows-an-algorithm,-represented-in-pseudo-code,-to-display-students'-test-scores-AQA-GCSE Computer Science-Question 10-2023-Paper 1.png

Figure 9 shows an algorithm, represented in pseudo-code, to display students' test scores. The algorithm does not work as expected and the teacher wants to find the ... show full transcript

Worked Solution & Example Answer:Figure 9 shows an algorithm, represented in pseudo-code, to display students' test scores - AQA - GCSE Computer Science - Question 10 - 2023 - Paper 1

Step 1

Complete the trace table for the algorithm shown in Figure 9

96%

114 rated

Answer

Trace Table Completion

countipersonjresult
00Natalie078
10Natalie181
20Natalie272
31Alex027
41Alex151
51Alex254
62Roshana052
72Roshana155
82Roshana259

Correction to the Error

To correct the algorithm in Figure 9, the appropriate change would be:

  • D Change line number 10 to: result ← scores[j * 3 + i]. This will ensure that the correct scores are being accessed based on the current index.

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

;