FL
๐Ÿšข Topic 11 Programming scenarios ยท Page 11.4

11.4 Ship Lab

Put it all together. Read a full scenario, plan it, and write a complete answer โ€” then check it against the requirements and the things a good answer shows. Six scenarios, four modes, and your code is run on test data.

๐Ÿ’ก This lab builds on the Read Lab and the Build Lab. If full scenarios feel hard, brush up in the Read Lab or the Build Lab โ€” or carry on here. Your call.
๐Ÿงช Exam Mode ON โ€” recall from memory, then reveal
ยง1 ยท Topic Overview

The finish line

Everything from the Read Lab and the Build Lab comes together here. The scenario question at the end of Paper 2 is worth 15 marks โ€” about a fifth of the paper. With 75 marks in 1 hour 45 minutes, plan on about 20โ€“25 minutes for it.

You can answer in pseudocode or in program code (Python, Java or Visual Basic). The Scenario Bench on this page reads pseudocode.

๐ŸŽฏ What a good answer shows

In our own words โ€” the kinds of thing the mark scheme looks for:

โœ” The data structures named in the scenario, used with those names
โœ” Several techniques โ€” selection, iteration, counting, totalling, input and output
โœ” Every requirement in the scenario covered
โœ” Suitable messages with inputs and outputs
โœ” Comments explaining the purpose of each part
ยง2 ยท Learning Objectives

By the end of this lab you will be able to:

  1. Write a complete answer to a full scenario in pseudocode
  2. Use the given data structures with their names and dimensions
  3. Cover every requirement in the list
  4. Join three to five patterns from the Build Lab into one program
  5. Validate every input with a loop
  6. Add messages to inputs and outputs, and comments to each part
  7. Output every match when ties are possible
  8. Choose an IPO table or a walk-through to plan
  9. Use about 20โ€“25 minutes well: plan, write, check
  10. Check your answer against the requirements before moving on
ยง3 ยท Key Terminology
TermMeaning
Full answerA complete program that meets every requirement in a scenario
Requirement coverageHow many of the listed requirements your program actually does
TechniquesSelection, iteration, counting, totalling, input and output
Method 1 โ€” IPO tableRead โ†’ Inputs / Processes / Outputs โ†’ code
Method 2 โ€” walk-throughTry the program with sample data, note each step, then turn the steps into code
Test dataExample values used to check a program does what it should โ€” the Scenario Bench uses it to check your code
ยง4 ยท Core Theory

ยง4.1 ยท Method 1 โ€” IPO table first

Best for scenarios that take data, work on it and output results โ€” most scenarios. Build the IPO table, then turn each row into code.

ยง4.2 ยท Method 2 โ€” walk through with sample data

Best for menu-driven scenarios, where the program repeats and branches on the user's choice. Walk through each choice with sample data ("the user picks 1, soโ€ฆ"), note the steps, then turn them into code.

ยง4.3 ยท A 20โ€“25 minute plan

4minutes ยท read the scenario twice and plan (IPO table or walk-through)
15minutes ยท write the code, adding comments and messages as you go
3minutes ยท check each requirement against your code

These timings are a guide, not a rule โ€” they add up to a fair share of the paper for 15 marks.

ยง4.4 ยท When time is short

Cover every requirement in a simple form first, then improve. A short attempt at each requirement, with comments and messages, is better than a perfect answer to some of them.

ยง4.5 ยท The every-match habit

For every "output the name(s)โ€ฆ" requirement, ask: could more than one item match? If so, find the value first, then output every item that matches. A Cambridge examiner report (2025) noted that only a few candidates output the names of all the competitors with the highest score.

ยง5 ยท Worked Examples

WE1 ยท Sports league ยท Method 1

Paper 2 style ยท TeamName[] (1D) and TeamPoints[] (2D) ยท four requirements.

Step 1 ยท IPO. Inputs: none โ€” the arrays are already filled. Processes: total for each team, count each result type, find the highest and lowest totals. Outputs: totals and counts with team names, then the name(s) for highest and lowest.
Step 2 ยท Counters. Set AwayWins, HomeWins, Draws and Losses to 0 at the start of each team.
Step 3 ยท Nested loops. The outer loop goes through the teams, the inner loop through the matches: add the points to the team's total, and use CASE (or IF) on 3, 2, 1, 0 to count each result.
Step 4 ยท Every match. Find the highest and lowest totals, then loop again to output every team with each.
Step 5 ยท Messages and comments. A label on every output and a comment on every part โ€” written as you go.

WE2 ยท Screen time ยท the lowest, with ties

Paper 2 style ยท StudentName[] (1D) and ScreenTime[] (2D).

The trap. "The student(s) with the lowest weekly total" could be one student or several.
First pass. Go through every student's total to find the lowest value.
Second pass. Go through again and output every student whose total equals the lowest. One match โ†’ one name; a tie โ†’ every name, with no extra code.

WE3 ยท Video library ยท Method 2 (menu)

Paper 2 style ยท Video[] (2D: title, format), Results[] and Count ยท menu with Add, Search and End.

Why Method 2? The program repeats and branches on the user's choice, so walk through each choice with sample data: "the user picks 1, so I input a title and format and store them".
Outer loop. WHILE Choice <> 3 DO โ€ฆ ENDWHILE, with the menu choice validated inside it.
Choice 1 ยท Add. Input a title and format, add 1 to Count, store them in Video[Count, 1] and Video[Count, 2].
Choice 2 ยท Search. Go through Video[], store each match in Results[] (up to 20), then output the results.
ยง6 ยท Common Misconceptions

๐Ÿšจ Coding before planning

Starting to code straight away is how requirements get missed. Read twice, plan (IPO table or walk-through), then code.

โœ… Fix ยท A few minutes of planning saves far more time later.

๐Ÿšจ Leaving comments and messages until the end

If time runs out, they get left out โ€” and both are expected in a good answer.

โœ… Fix ยท Add a comment and messages as you write each part.

๐Ÿšจ Perfecting one requirement while another is untouched

Twenty minutes on a perfect validation loop leaves the last requirement with no code.

โœ… Fix ยท Cover every requirement simply first, then improve.
ยง7 ยท Exam Focus

What a good answer shows

In our own words โ€” the kinds of thing the mark scheme looks for.

The data structures from the scenario, used with the names given and in the way described
More than one technique used for the scenario: selection, iteration, counting, totalling, input and output
Every requirement in the scenario covered
Suitable messages with inputs and outputs
Comments explaining the purpose of each part of the program
ยง8 ยท Quick Knowledge Check

Tap each card to reveal (0/8 revealed)

Q1 ยท How many marks is the scenario question worth, and about how long should it take?
โœ… 15 marks โ€” about 20โ€“25 minutes of a 1 hour 45 minute paper.
Q2 ยท Name the five things a good answer shows.
โœ… Data structures as given ยท several techniques ยท every requirement covered ยท messages ยท comments.
Q3 ยท What are the two planning methods?
โœ… Method 1: an IPO table, then code. Method 2: walk through with sample data, note the steps, then code.
Q4 ยท When does Method 2 suit better?
โœ… When the scenario is menu-driven โ€” the program repeats and branches on the user's choice.
Q5 ยท Short of time โ€” what first?
โœ… A simple attempt at every requirement, with comments and messages, before polishing anything.
Q6 ยท What is the every-match habit?
โœ… For "output the name(s)โ€ฆ", find the value first, then loop again and output every item that matches.
Q7 ยท When should you write comments?
โœ… As you write each part โ€” not at the end.
Q8 ยท Can you answer in Python instead of pseudocode?
โœ… Yes โ€” pseudocode or program code (Python, Java or Visual Basic) can be used. The checker on this page reads pseudocode.
ยง9 ยท Ready for the Scenario Bench?

๐Ÿšข You know the methods and what a good answer shows

Head to Activities. Start with Walk-through for the menu-driven video library, then try Guided on another scenario. Timed and Exam modes unlock as you complete scenarios.

๐ŸŽฏ What a good answer shows

1Data structures, with the names given
2Several techniques
3Every requirement covered
4Messages with inputs and outputs
5Comments on each part

๐Ÿ“– Pseudocode and Python

Same logic, different notation. Either can be used in the exam; this page's checker reads pseudocode.

PseudocodePython
INPUT Namename = input()
OUTPUT "Hi ", Nameprint("Hi", name)
Total โ† 0total = 0
FOR i โ† 1 TO 10for i in range(1, 11):
IF X = 5 THENif x == 5:
WHILE X <> 0 DOwhile x != 0:

๐Ÿ† Where you are

0Scenarios completed (of 6)
2Modes unlocked (of 4)
0Practice attempts
0Exam questions
0Skills mastered

๐ŸŽฏ Weakest skills

Topic 11 Path

11.1โ€“11.2 Read Lab
11.3 Build Lab
๐Ÿ“ 11.4 Ship Lab (this page)

Cambridge syllabus

Topic 11 is this site's practice for the 15-mark scenario question at the end of Paper 2. It draws on syllabus Topic 7 (algorithm design and problem-solving) and Topic 8 (programming).

๐Ÿ“– Getting started

The scenario question is worth 15 of the 75 marks on Paper 2 โ€” the biggest single question. Answering it well is about covering every requirement clearly, not about clever code.

๐Ÿ“– Context

A collector stores video details in Video[] (title and format) and uses Results[] for search matches. The program shows a menu: Add, Search, End. Because it repeats and branches on the user's choice, a walk-through with sample data plans it better than an IPO table alone.

๐Ÿ“– Discussion

With a few minutes left, your code covers 4 of the 5 requirements but has no comments. What do you do? Tap to reveal.
A quick, simple attempt at requirement 5, and a short comment on each part. Every requirement and comments are both looked for, so some of each beats polishing one part. Better still: add comments as you go, so this never happens.

Contrast box 1 ยท With and without comments

โŒ No comments

Total โ† 0
FOR Index โ† 1 TO 10
   Total โ† Total + Scores[Index]
NEXT Index
OUTPUT "Total: ", Total

Correct code, but the reader has to work out what each part is for.

โœ… Commented

// add up the 10 scores
Total โ† 0
FOR Index โ† 1 TO 10
   Total โ† Total + Scores[Index]
NEXT Index
// show the total with a label
OUTPUT "Total: ", Total

Each part says what it is for. Comments are expected in a scenario answer.

Contrast box 2 ยท Method 1 vs Method 2

Method 1 ยท IPO table

Best for: take data โ†’ work on it โ†’ output results.

Inputs  | Processes     | Outputs
scores  | total, count  | total
        | average       | average

Turn each row into code. Suits most scenarios.

Method 2 ยท Walk-through

Best for: menus and repeated choices.

User picks 1 โ†’ input title, format โ†’ store
User picks 2 โ†’ input title โ†’ search โ†’ output
User picks 3 โ†’ end the loop

Turn each walked step into code.

๐Ÿงช What does this show?

Tap the thing each piece of code shows. This trains you to check your own answer.

๐Ÿ“Œ Six habits for a full answer

HabitIn pseudocodeWhat it shows
Initialise before addingTotal โ† 0 before the loopTotalling and counting done correctly
Validate with a loopREPEAT โ€ฆ UNTIL or WHILE โ€ฆ DOThe validation requirement
A second pass for every matchFind the value, then loop againThe "name(s)" requirement
Message every input and outputOUTPUT "Enter the score: "Messages
Comment every part// find the lowest totalComments
Use the given namesTeamName[], not Teams[]Data structures as given

๐Ÿšจ Six trap cards

Trap 1 ยท One match when several tie

Outputting only the first student with the lowest total when two share it.

Cambridge examiner report (2025) โ€” only a few candidates output the names of all the competitors with the highest score
โœ… Find the lowest, then output every student whose total equals it.

Trap 2 ยท Renaming the given data structures

The scenario says TeamPoints[]; the answer uses Points[].

Good exam habit
โœ… Copy the names from the scenario exactly.

Trap 3 ยท Not covering every requirement

One requirement is polished while another has no code.

Cambridge examiner report (2024) โ€” the highest marks went to answers that covered all the points in the scenario
โœ… Cover every requirement simply first, then improve.

Trap 4 ยท Leaving out comments

Comments are left until the end โ€” and the time runs out.

Cambridge examiner report (2023) โ€” leaving out comments was a common error
โœ… Comment each part as you write it.

Trap 5 ยท Missing messages

INPUT Score with no prompt; outputs with no label.

Good exam habit
โœ… A message before every INPUT; a label in every OUTPUT.

Trap 6 ยท Using IF to validate

An IF only asks again once, so a second wrong value gets through.

Cambridge examiner report (2025) โ€” an IF only allows one extra data entry
โœ… REPEAT โ€ฆ UNTIL Score >= 0 AND Score <= 100.

๐ŸŽฏ Quick check

1 ยท Short of time โ€” what first?
A simple attempt at every requirement, with comments and messages.
2 ยท Why isn't IF enough for validation?
It only asks again once. A loop keeps asking until the value is valid.
3 ยท Which method suits a menu?
Method 2 โ€” walk through each choice with sample data.
4 ยท What does the second pass give you?
Every match: one name if there's one, every name if there's a tie.

๐Ÿšข Ready for the Scenario Bench?

Six scenarios, four modes, and your code is run on test data.

๐Ÿšข Scenario Bench

Pick a mode and a scenario, write your pseudocode, then press Check my answer. Your whole program is run on test data for each requirement, and checked for the things a good answer shows. This is practice feedback, not an exam mark.

0Scenarios completed
0Answers checked
โ€“Last result

1 ยท Choose a mode

2 ยท Choose a scenario

3 ยท The scenario

Choose a scenario above.

4 ยท Write your pseudocode

โšก 60-second Sprint

Quick recall on full answers and exam technique. Sprint is for speed โ€” it doesn't change your Mastery.

60Seconds
0Correct
0Streak

โœ… The checklist

Data structures โ€” the names from the scenario are used.
Requirements โ€” each one is tested by running your code.
Messages โ€” a prompt before each input, labels on outputs.
Comments โ€” at least one for each part.
Techniques โ€” at least three of selection, iteration, counting, totalling, input/output.

A scenario counts as completed when the data structures and every requirement pass, without a model answer being shown first.

โฑ Modes

1 ยท Walk-through โ€” the video library menu, planned step by step with sample data (Method 2).
2 ยท Guided โ€” any scenario. A model answer is available (the attempt then isn't counted).
3 ยท Timed ๐Ÿ”’ โ€” any scenario, 15 minutes, no model answer. Unlocks after 1 completed scenario.
4 ยท Exam ๐Ÿ”’ โ€” any scenario, 25 minutes, no model answer, one check. Unlocks after 2 completed scenarios.

โœŽ Practice โ€” 18 multiple-choice questions

Data structures, techniques, requirements, messages and comments, and exam technique. Skills you get wrong come back more often. Missed questions are saved to Mistakes.

๐Ÿงช Practice Exam Mode ON. No choices shown โ€” recall the answer, then reveal and self-mark.

๐Ÿ“Š Practice stats

0Attempts
โ€“Accuracy

๐ŸŽฏ Weakest skills

๐Ÿ“‹ Exam-style questions โ€” 12 questions

Paper 2 style questions on full answers. Answer every part, then press Mark my answer. Code answers are run on test data, so any correct version earns the marks. For full scenarios, use the Scenario Bench.

๐Ÿ“‹ Exam stats

0Attempts
โ€“Average mark

โ„น๏ธ About these questions

Written in the style of Cambridge Paper 2; the scenarios are made up for practice. Use the names given in each question. Both โ† and <- work, and MOD, DIV, LENGTH and CASE are understood.

๐Ÿ”„ Review โ€” 10 traps + 6 memory triggers

Read these before your exam. Then look at Mistakes to see the ones you make.

10 traps to know

๐Ÿง  Memory triggers

Six one-liners to recite before your exam.

๐ŸŽฏ Your weakest skills

๐Ÿ’” Your logged mistakes

๐Ÿ† Mastery โ€” revision checklist

Tick each item as you master it. In the skill grid, tap a status chip to set it yourself. When all 12 are ticked, the Module Mastered banner appears.

๐Ÿ† Module Mastered โ€” 11.4 Ship Lab complete! You're ready for the scenario question.

Revision checklist

Skill grid

Mastered = 3+ attempts and at least 70% accuracy. Tap the status chip to override it.

โœ… Topic 11 complete

That's the last topic in the Learning Hub. Head back to the Learning Hub to revise your weakest topics โ€” or start again from Topic 1.

๐Ÿ“Š Overview

0Skills attempted
0Skills mastered

Topic 11 Path

11.1โ€“11.2 Read Lab
11.3 Build Lab
๐Ÿ“ 11.4 Ship Lab (this page)

๐Ÿ’” Mistakes

Your mistakes log

Every wrong Practice, Exam or Scenario Bench answer is saved here automatically.

๐Ÿ“Š Progress

Progress dashboard

Your attempts, accuracy and mastery counts in the Ship Lab.

Practice

0Attempts
โ€“Accuracy

Exam

0Attempts
โ€“Average

Focus recommendation

Weakest skills

๐Ÿ”– Bookmarks

Bookmarked questions

Bookmark an exam question to save it here.

๐Ÿ“ My Notes

My notes

Jot notes as you learn. Everything here is saved on this device only.

Add a note

Notes on this page (saved on this device only)

Quick stats

0Notes saved
0Page notes
๐Ÿ—„๏ธ Vault

Your knowledge vault

Sent mistakes and saved key facts, in one place.

Saved โœ“