Six original Cambridge-style questions on documenting and converting algorithms, with mark-scheme style answers.
Explain what is meant by an algorithm.
A program inputs a student's name and the number of hours they studied on each of 5 days, and outputs their name with the total hours. Complete an identifier table for three of the identifiers it needs.
The algorithm in Fig. 1 is run with the inputs 8, 15, 4, 9, -1. State the final values of Total and Count and the output.
Write pseudocode from this structured English description:
1. SET Highest to 0
2. REPEAT the next two steps 10 times
3. INPUT a score
4. IF the score is greater than Highest, SET Highest to the score
5. OUTPUT Highest
Highest ← 0 before the loop. ✓FOR Index ← 1 TO 10 ... NEXT Index. ✓INPUT Score inside the loop. ✓IF Score > Highest THEN Highest ← Score ENDIF inside the loop. ✓OUTPUT Highest after the loop. ✓Describe how the pseudocode WHILE Number > 9 ... ENDWHILE would be drawn as part of a flowchart.
Number > 9? placed before the loop body. ✓Give one advantage of each method of documenting an algorithm: (a) structured English; (b) a flowchart; (c) pseudocode.
Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.