G2 Computing, syllabus K237 for the 2027 Singapore-Cambridge Secondary Education Certificate (SEC), includes programming with Scratch, including loops, conditions and variable updates. If your child can start a Scratch program but cannot make it stop at the correct time, the issue may be the stopping condition or the values that change while the loop runs. A program can execute without displaying an error and still fail to do what the task requires.
For Punggol parents, ask the learner to predict the value of a variable before and after each repetition rather than repeatedly clicking the green flag. K237 has an electronic theory examination and a computer-based practical examination, each weighted 50%. Scratch programming is only one part of a syllabus that also includes spreadsheets, media software and computing knowledge. This guide helps children develop independent debugging without completing their school tasks for them.
- 2027 SEC G2 Computing: K237, a new syllabus listed by SEAB.
- The syllabus includes variable initialization and updates, basic and conditional loops, logical and comparison operators, and debugging.
- A repeat block runs a specified number of times; a repeat-until block stops when its condition becomes true.
- A loop may never stop if the condition cannot become true or the controlling value is not updated.
- Test the initial value, boundary case and a value beyond the threshold.
- Paper 1 is a 90-minute electronic examination (70 raw marks); Paper 2 is a 135-minute lab examination (80 raw marks).
- Teach the student to predict, test and repair original programs independently.
Find the question your family needs
- What does a loop do?
- Worked example: a repeat-until loop that stops
- Why does a loop sometimes never stop?
- What does a threshold condition change?
- What happens if the variable never changes?
- Why does initialization matter when the green flag is clicked again?
- How do and, or and not affect a stopping condition?
- A three-question independent diagnostic
- A four-week learning plan and appropriate help
1. What does a loop do?
A loop repeats an instruction or group of instructions. A repeat block can be used when the number of repetitions is known in advance, such as moving a sprite five times. A conditional loop is useful when repetition depends on what is happening, such as continuing until a score reaches a target.
The 2027 K237 programming module includes these ideas and identifies Scratch blocks for both papers. A learner needs to understand their effect, not only recognise their colours and shapes. Begin with a paper trace and one variable before introducing multiple sprites or interactions.
2. Worked example: a repeat-until loop that stops
Imagine an original practice script: set score to 0; repeat until score = 5, changing score by 1 inside the loop; then say ‘Finished’. The condition is false when score is 0, so the body runs. The score progresses through 1, 2, 3, 4 and 5. When the stopping condition becomes true, the loop ends.
The child should be able to predict that the body executes five times and that score equals 5 at the end. If the score already begins at 5 and is not reset, a repeat-until loop with the condition score = 5 would not need to run its body at all. Initialization therefore matters.
3. Why does a loop sometimes never stop?
Now change the script: initialize score to 0, repeat until score = 5, and change score by 2 each time. The values become 2, 4, 6, 8 and so on. They pass the target without ever equalling it. The condition remains false, so the script does not finish on its own under these assumptions.
This is a logical error rather than necessarily a software crash. For an ordinary practice task, stop the running project using the stop control and inspect the trace. Ask whether the intended task is to reach exactly five or to reach at least five. Those are different requirements.
4. What does a threshold condition change?
If the requirement is to stop when score reaches five or more, a suitable Scratch condition is not (score < 5), using the equivalent of greater than or equal to five. Starting at zero and adding two each time gives 2, 4 and 6. At six, the stopping condition is true and the loop ends after three repetitions.
Scratch’s comparison blocks include less than, greater than and equals. The not block can express the negation of a comparison. If the task requires an exact final score of five, however, the threshold repair alone does not meet it; the update or final-step logic must also change. Read the actual specification before choosing the fix.
5. What happens if the variable never changes?
A script sets count to zero and repeats until count = 3, but only moves a sprite inside the loop. Unless another relevant script changes count, the value remains zero. The sprite movement does not automatically update a separately stored variable. The loop’s stopping condition never becomes true.
Ask the child to identify the value controlled by the condition, the block that changes it and the place where that block should run. Make one repair, then trace again. This is more informative than rebuilding the entire project from a tutorial.
6. Why does initialization matter when the green flag is clicked again?
A variable may retain an earlier value unless the program initializes it as required. If the game starts with an old score, the stopping condition may immediately be true or may never be reached as intended. The appropriate initial state depends on the task. A reset at the beginning is often essential for a reproducible practice example.
Test a script twice in succession. If the second run behaves differently without an intentional reason, inspect initialization and any other scripts that modify the variable. This is a practical debugging habit that helps with more complicated programs too.
7. How do and, or and not affect a stopping condition?
Consider a fictional quiz that should stop when the learner has reached the target score or when time runs out. The logical or operator makes the condition true if either event happens. If the task instead requires both conditions to be satisfied, the logical and operator has a different effect.
Before creating blocks, ask the child to list four possible cases: neither condition true, only the first true, only the second true, both true. Predict whether the loop should stop in each case. This paper-based logic check often reveals the mistake before the learner runs the program.
8. A three-question independent diagnostic
A: Set count to 1; repeat until count = 4, changing count by 1. How many repetitions occur? B: Set count to 0; repeat until count = 5, changing count by 2. Does the loop finish by itself? C: Set count to 0; repeat until not (count < 5), changing count by 2. What is the final count?
Answers: A three repetitions, final count 4. B no under the stated conditions, because the sequence of even values never equals 5. C final count 6 after three repetitions. These are original practice traces, not official exam questions. Give the student changed values after a delay and ask them to explain their own prediction.
9. A four-week learning plan and appropriate help
Week one: trace initial values and simple repeat blocks. Week two: trace conditional loops and repair missing updates. Week three: practise equality, thresholds and logical operators. Week four: independently build and test a small original Scratch task, including a second run and boundary values. Preserve practice in the other K237 modules, especially spreadsheets and media tasks.
A parent can provide a suitable device, time and questions during ordinary learning. Do not produce assessed work or supply answers in a supervised assessment; follow school instructions about permissible help. Ask the Computing teacher whether the main difficulty is understanding logic, manipulating blocks or testing. G2 Computing offers useful computational skills regardless of whether a different subject level is subsequently available or suitable.
Official syllabus and further reading
The examination details and topic scope were checked against the official 2027 school-candidate syllabus on 3 December 2026. Check the applicable candidate-year document for subsequent cohorts. All worked questions are original teaching illustrations rather than official examination questions.
Official SEAB 2027 K237 syllabus (PDF)
Link: https://isomer-user-content.by.gov.sg/334/ec79d6ea-4e2d-4296-acfa-318be509e3e0/K237_y27_sy.pdf
SEAB 2027 G2 syllabus directory
Link: https://www.seab.gov.sg/secondary-education-certificate-sec/g2-syllabuses-for-school-candidates-2027/
MOE: Full Subject-Based Banding and SEC transition
Link: https://cos.moe.gov.sg/2024-announcements/
G2 Computing: tracing and testing programs
Link: https://edukatepunggol.com/2026/12/01/g2-computing-syllabus-g3-tracing-testing-programs/
G2 Computing: spreadsheet cell references
Link: https://edukatepunggol.com/2026/12/03/seab-moe-g2-computing-k237-spreadsheet-absolute-relative-cell-references/
Complete 2027 G2 Computing examination guide
Link: https://edukatepunggol.com/2026/11/28/new-sec-g2-examination-guide-seab-moe-computing-k237-punggol-parent-questions-2027/
