The following pseudocode algorithm uses a count-controlled loop to read in 10 names and store them in the array Names [] FOR Count ← 1 TO 10 OUTPUT "Please enter a name" INPUT Name Names [Count] ← Name NEXT Count Rewrite the algorithm in pseudocode, using a condition-controlled loop instead of a count-controlled loop.
- The following pseudocode algorithm uses a count-controlled loop to read in 10 names and store them in the array Names [] FOR Count ← 1 TO 10 OUTPUT "Please enter a name" INPUT Name Names [Count] ← Name NEXT Count Rewrite the algorithm in pseudocode, using a condition-controlled loop instead of a count-controlled loop.[4]
Mark scheme
Marking points from the official mark scheme (May/June 2025). The mark or mark type is shown in brackets.
- [1] Initialising a count variable outside of loop
- [1] Correct use of loop with condition for 10 times (WHILE (DO)...ENDWHILE, REPEAT...UNTIL) with close
- [1] Incrementing the count variable inside the loop
- [1] Rest of algorithm correct
- Example: Count ← 1 REPEAT OUTPUT "Please enter a name" INPUT Name Names [Count] ← Name Count ← Count + 1 UNTIL Count > 10 Or Count ← 1 WHILE Count <= 10 DO OUTPUT "Please enter a name" INPUT Name Names [Count] ← Name Count ← Count + 1 ENDWHILE
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →