IB Computer Science: Computational Thinking and Problem Specification — Tutor Lesson Plan (six parts, 14 attributes to 6, a fine trace of 25.5)
- 2026-11-28
A problem specification looks like a homework format, but it is the first cut of any solution: if the inputs and outputs are unclear, no amount of code rescues the project. Computational thinking is the same, a set of techniques rather than a program.
01 Prerequisites (3-minute check)
If any of these fails, fix it before the lesson starts.
| Skill | Quick check | Pass mark |
|---|---|---|
| Percentages | 6 kept out of 14, what fraction is that? | 42.9% |
| Multiplication | 1,200 students with 3 loans each, how many lookups? | 3,600 |
| Conditional logic | 45 days overdue at 0.5 per day with a cap of 20.0 | 20.0 |
02 Lesson flow (60 minutes)
| Time | Stage | Tutor does | Student does |
|---|---|---|---|
| 0-7 min | Specification before code | how many lines of inputs and outputs can you write? | write three lines, compare at the end |
| 7-20 min | The six parts | a library with 1,200 students and 8,000 books | fill the specification table |
| 20-33 min | The four concepts | 14 attributes to 6, 47 steps to five modules | fill the abstraction and decomposition tables |
| 33-45 min | Pattern recognition and algorithmic design | 9,600,000 checks against 3,600 | compute the difference and reuse one rule |
| 45-55 min | Symbols and tracing | six symbols, total fine 25.5 | draw the chart and the trace table |
| 55-60 min | Exit check | three questions marked on the spot | work alone |
03 Teaching script (read it out)
Scene 1: The six parts, inputs and outputs first
The sixth part, the evaluation criteria, is where marks are lost, and each criterion must pair with a goal: 1.0 minute for 95% of visits, a fine error rate under 0.5%, availability of 99.0% between 08:00 and 17:00 on school days, and staff handling the counter within 2.0 hours of training. A wish that the system be fast is not a criterion because nobody can accept or reject it; a measured threshold can be tested.
Show what a missing constraint costs: leave out the unreliable network and the design depends on a cloud database, so an outage in exam week stops the whole library. The specification is not paperwork, it is the risk written down in advance.
Student task: rewrite the requirement that the library system be convenient into two measurable criteria, each with a number and a method of measurement.
Scene 2: The four concepts: abstraction, decomposition, pattern recognition and algorithmic design
Then decomposition: the flow has 47 steps, and written as one program a change to the fine rule means rereading everything. Split it into a 9-step main flow plus five modules of 12 for loans, 9 for returns, 8 for overdue checks, 6 for fines and 3 for reports, 38 steps in total, and define 4 interfaces: the main flow passes a student number and a barcode to the loan module, which returns success or failure. Each module can be tested alone, at the price of maintaining the interfaces.
Pattern recognition next: the overdue rule is identical for books, discs and calculators, so write it once and use it three times. The pattern of check the limit before adding also appears in loans, renewals and fines.
End on algorithmic design with one number: comparing every student with every book takes 1,200 times 8,000, which is 9,600,000 checks, while an index that reads the 3 loans actually held takes 1,200 times 3, which is 3,600, a factor of 2,666.7. Computational thinking is precisely this step of finding another way.
Student task: write an abstraction list for a subject-choice system, keeping 5 of 12 grade attributes, and a three-level decomposition with one reason for each attribute dropped.
Scene 3: Six flowchart symbols and a trace table
Then trace the fine loop: total starts at 0, n starts at 1, and each pass reads the days overdue d. The fine is d times 0.5, compared with 20.0 and cut to the cap if larger, added to total, then n increases by one, and the loop ends once n passes 3. With inputs 4, 7 and 45: pass one gives 4 times 0.5 equal to 2.0, under the cap, total 2.0; pass two gives 3.5 and total 5.5; pass three gives 45 times 0.5 equal to 22.5, above 20.0 so it is cut to 20.0, and the total becomes 25.5.
Three rules of tracing: write n, d, fine and total in four columns every pass; write yes or no in the decision column instead of a tick; and remember the loop test runs once more after the last input, so 3 inputs produce 4 decisions. The cap arrives on day 40, which is 20.0 divided by 0.5, and that is why a long overdue loan pays only 20.0.
Practise a second trace: five marks of 62, 48, 75, 39 and 88, testing whether each is at least 50, counting passes and accumulating every mark. The trace gives 3 passes at 60.0%, a total of 312 and a mean of 62.4.
Student task: change the fine loop so that a loan may be renewed twice at most, redraw the flowchart and trace one student who renews three times, writing the outcome of every decision.
04 Question types and worked steps
| Type | Example | Steps | Answer |
|---|---|---|---|
| Write a specification | a scenario such as a library, subject choice or locker booking | six parts in order: one-sentence problem, three to five constraints, measurable goals, input formats, output lists, criteria paired one to one with goals | a 1.0 minute queue for 95%, fine error under 0.5%, availability 99.0%, training 2.0 hours |
| Perform abstraction | a list of 14 attributes | three steps: ask whether each attribute can change a system decision, drop the ones that cannot, write one purpose for each attribute kept | 6 kept at 42.9%, 8 dropped |
| Perform decomposition | a flow of 47 steps | three steps: group by verb, count the steps in each module, list the inputs and outputs between modules | a 9-step main flow plus 38 steps in five modules and 4 interfaces |
| Trace a flowchart | pseudo-code with inputs 4, 7 and 45 | four steps: draw four columns, update each pass, write yes or no at each decision, output after the loop | 2.0, 3.5 and 20.0, total 25.5 |
| Judge whether a criterion is measurable | four statements: it must be fast, it must be accurate, the error rate must be under 0.5%, staff must be ready in two hours | two steps: ask how it would be accepted and with what number, then rewrite anything without a number | the last two are measurable; the first two need numbers such as 1.0 minute and 0.5% |
05 Independent practice (3 questions)
| Question | Answer | What to watch |
|---|---|---|
| A loan period of 14 days, a fine of 0.5 per day and a cap of 20.0. Find the fine for 7 days overdue, for 60 days overdue, and the day the cap is reached. | 3.5, then 20.0, with the cap reached on day 40 | multiply first, then apply the cap |
| A system serves 1,200 students with at most 3 loans each. Compare a pairwise scan with an indexed lookup and state the factor. | 9,600,000 against 3,600, a factor of 2,666.7 | separate students times books from students times loans held |
| Five marks of 62, 48, 75, 39 and 88 against a pass line of 50, counting passes and accumulating every mark. Find the pass count, the total and the mean. | 3 passes at 60.0%, total 312, mean 62.4 | the total includes failing marks as well |
06 Common mistakes and what to say
| Mistake | Student writes | Say this |
|---|---|---|
| Criteria written as adjectives | answering that the system must be fast, accurate and easy | fast compared with what, accurate to how many places? Rewrite as measurable: a 1.0 minute queue for 95% of visits, a fine error rate under 0.5% and availability of 99.0%. Criteria without numbers always end in an argument at acceptance. |
| Abstraction taken as dropping what is awkward | answering that replacement cost is left out because fines are hard | abstraction drops attributes that cannot change a decision, keeping 6 of 14 and losing colour and weight. Replacement cost drives the fine, so dropping it just defers the work to the counter. |
| A flowchart with one exit from the diamond | answering that the decision continues downwards | every diamond has a yes exit and a no exit, otherwise the trace cannot say where the other case goes. Here 3 inputs produce 4 decisions and each one must be written yes or no. |
| More modules must be better | answering that the flow should be split into twenty-six modules | every split adds an interface. Splitting 47 steps into 9 plus five modules with 4 interfaces already gives independent tests; twenty-six modules only multiplies the management cost. |
07 Homework (paper, section and question numbers)
- IB Computer Science chapter index — the three questions on this page for homework
- Data representation, binary and logic gates — previous chapter in the same subject: the data foundations of Theme A
- Data preprocessing: cleaning, feature selection and reduction — cross-theme: feature selection is abstraction applied to data
08 Exit check (last 5 minutes)
| Question | Answer | Decision |
|---|---|---|
| Specification | six parts, a 1.0 minute queue for 95% | goals without criteria means restart scene one |
| Abstraction | 14 down to 6, 42.9% | no reason for dropping means practise again |
| Trace | 2.0, 3.5, 20.0, total 25.5 | missing the last loop test is not finished |
09 Tutor FAQ
Does computational thinking require programming?
No. B1.1.3 states explicitly that computational thinking need not involve programming; it is a toolkit of problem-solving techniques. The specification table and the flowchart here can all be done on paper, which also makes it obvious whether the inputs and outputs were really thought through.
Must the six parts be memorised?
They must be written out, not recited. The six parts ask what the problem is in one sentence, what constrains it, what it must achieve, what the inputs look like, what the outputs are and how it will be accepted. Marks come from specificity, so an input is a thirteen-digit barcode rather than student details.
Flowchart or pseudo-code first?
Either, but they serve different purposes: a flowchart shows the branches and loops, while pseudo-code carries the detail. B1.1.4 requires tracing a flowchart for outputs and variable changes, so sketch the flowchart first and keep a trace table beside it; that also keeps students from reducing a flowchart to a list of statements.
Find a tutor — freeTutor Registration →
A TutorZone lesson-prep guide. Written by the TutorZone team; questions and lesson flow are original and are not taken from any school or publisher material.



