Computer Science · Oct / Nov 2022 · Paper 22 · Question 5
2210
As printed in the paper
The question as text
This pseudocode should allow 500 marks to be entered into the algorithm. If the mark is 80 or greater it is stored in an array for higher marks. If the mark is less than 80, but greater than or equal to 50 it is stored in an array for middle marks. The remaining marks are stored in an array for lower marks. The results from the algorithm are displayed at the end. 01 HighList 0 02 MidList 0 03 LowList 0 04 MarksEntry 0 05 REPEAT 06 INPUT Mark 07 IF Mark >= 80 08 THEN 09 Higher[HighList] MarksEntry 10 HighList HighList + 1 11 ELSE 12 IF Mark >= 50 13 THEN 14 Middle[MidList] Mark 15 MidList MidList 16 ELSE 17 Lower[HighList] Mark 18 LowList LowList + 1 19 ENDIF 20 ENDIF 21 MarksEntry MarksEntry + 1 22 NEXT MarksEntry = 500 23 OUTPUT "You entered ", HighList, " higher marks" 24 OUTPUT "You entered ", MidList, " middle marks" 25 OUTPUT "You entered ", LowList, " lower marks"
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
5(a)[4]
5(b)[4]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

