Longer tasks
The longer questions at the end of an onscreen paper, worth 12 to 15 marks: decomposing a problem into subroutines, working part by part, testing as you go and managing your time.
Decompose first
The last questions on an onscreen paper are longer: a whole small system, such as a club's membership or a shop's stock, worth 12 to 15 marks. They are easier than they look once they are decomposed into small subroutines, each doing one job.
- Read the whole task and its data first: what is one record, one line, one cell?
- List the jobs: read a line, check a value, total, sort, print a report.
- Give each job a subroutine with a clear name and parameters.
- Write and test the smallest subroutine first.
- Build the next one on top, calling what already works rather than repeating it.
In the questions here each part is its own program in its own editor and is marked on its own, so a slip in one part never costs you the others.
The rest of this lesson and its 6 practice questions are in Plus.
Screen 1 of 4, free to read.
- 6 exam-style questions, marked as you go, each with a worked solution
- Anything you get wrong is saved to your flashcards