G3 Computing tuition can help your child distinguish AND from OR by testing what must be true for a condition to pass. AND requires both Boolean conditions to be true; inclusive OR requires at least one, including the case where both are true.
For Punggol parents, ask your child to explain a rule in plain English before writing code. ‘A score must be at least 0 and at most 100’ requires both limits. Using OR would admit values outside the intended range.
The 2027 SEC G3 Computing syllabus is K349 and includes Boolean operators. This guide uses original Python-style conditions and test cases to connect the written requirement, logical expression and program behaviour.
Find your next learning step
Translate the requirement first · Test the mistake with real values · Use all four Boolean cases · Practise boundaries and negation · Check independent debugging
Match support to the student’s actual subject level and examination year. PG1, PG2 and PG3 are Posting Groups; they do not replace checking the individual subject’s G level. Confirm the provider’s subject availability before booking.
Translate the requirement first
Write each condition separately. For a score between 0 and 100 inclusive, A is ‘score >= 0’ and B is ‘score <= 100'. Both must hold.
The combined expression is score >= 0 and score <= 100. Python also permits the chained comparison 0 <= score <= 100. Understanding the two conditions remains useful even when the shorter notation is used.
Ask what would make the input invalid. It is below 0 or above 100, so an invalidity test is score < 0 or score > 100.
Test the mistake with real values
For score = −5, the first valid-range condition is false and the second is true. AND returns false, correctly rejecting the score. OR returns true, incorrectly accepting it.
For score = 105, the first condition is true and the second false. Again, AND rejects it while OR accepts it.
For score = 50, both conditions are true. Both operators return true here, so testing only a typical valid value would fail to expose the faulty rule.
Use all four Boolean cases
For A and B: true/true gives true; true/false gives false; false/true gives false; false/false gives false.
For A or B: true/true, true/false and false/true give true; false/false gives false. Inclusive OR does not mean exactly one condition.
For a rule such as ‘has a membership card or has a guest pass’, someone with both qualifies under inclusive OR. If the requirement says exactly one, it needs a different expression, not ordinary OR.
Practise boundaries and negation
Test −1, 0, 100 and 101 for the inclusive score range. The outcomes should be false, true, true and false. Boundary tests reveal incorrect use of strict versus inclusive comparison operators.
The expression not (score >= 0 and score <= 100) is equivalent to score < 0 or score > 100 for ordinary numeric scores. Explain why negating the whole range changes both comparisons and the connecting operator.
Use parentheses when combining several conditions so the intended grouping is visible. Trace the expression step by step rather than guessing from its length.
Check independent debugging
Give a new requirement: a temperature must be at least 5 and below 30. The student should write temperature >= 5 and temperature < 30, then test 4, 5, 29 and 30.
Ask the child to choose a test value that makes an incorrect OR version fail visibly. A value of 4 works: the second comparison is true, so OR would accept an invalid value.
Continue with the existing normal, boundary and invalid test-data guide to make testing systematic.
Choose a focused next step
Use the Primary, PSLE and SEC subject directory for related guides. Bring one recent piece of work and the teacher’s feedback to a consultation. Ask which reasoning step needs repair and how progress will be checked on a new task.
The Clementi Secondary 1 Mathematics guide illustrates diagnosis, sequenced practice and focused 3-pax teaching. These principles help parents ask practical questions when choosing support for the actual subject.
Official reference: SEAB 2027 SEC G3 syllabus K349, checked 11 October 2026. The examples in this guide are original teaching exercises, not SEAB questions or official model answers.

