Six original Cambridge-style questions on writing maintainable programs, with mark points.
Identify three ways a programmer can make a program easier to maintain.
Explain why programmers use meaningful identifiers.
Rewrite this pseudocode to make it more maintainable.
A ← 0
FOR B ← 1 TO 7
INPUT C
A ← A + C
NEXT B
OUTPUT A / 7// average daily temperature for one week. ✓CONSTANT DaysInWeek ← 7, used in the loop and the division. ✓DECLARE Temperature : REAL. ✓Explain the purpose of comments in a program.
Explain why each identifier is unsuitable: (a) Average Mark (b) Q for the number of questions answered (c) Total_Cost
A program uses the value 15 in several places as the maximum number of players. Explain the benefit of declaring it as a constant.
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.