Community resourceWorksheet
1CP2-CT-2.8 Selection and while-loop checkpoint
Part 8 of 8 · 1CP2-CT-2 · Selection, strings and while loops
The checkpoint for the whole series, sampling strings, selection and while loops in one integrated task.
Students will:
- use string methods accurately and say what they leave unchanged
- write a condition for an inclusive range
- correct a wrongly ordered selection chain
- state the complete output and final value of a loop
- write an integrated program and choose a boundary test for it
Inside: 7 explanation cells, 2 multiple-choice questions, 1 Python task, 2 fill-in-the-blanks cells and 4 written answers. 20 marks, about 45 minutes.
Series: 1CP2-CT-2 · Selection, strings and while loops, part 8 of 8.
Shared by Coding PathwayVerified teacher
- 16 cells
- About 45 minutes
- CC BY-SA 4.0
- Shared 17 Aug 2026
Preview
The whole resource, exactly as a class sees it. Answers and marking are held back.
Selection and while-loop checkpoint
This checkpoint assesses only 1CP2-CT-2. Each section gives a concise method reminder, then uses new contexts and values. It does not assess principles-strand number representation.
1. Strings
Remember: indexes begin at zero; a slice includes its start and excludes its stop; methods return changed copies. Save a returned value when it will be used later.
topic = "Algorithm", len(topic) is gap 1, topic[0] is gap 2, and topic[1:4] is gap 3.- A
- Alg
- lgo
- 8
- 9
Explain why clean = raw.strip(" ").lower() does not alter the value stored in raw.
Refer to the result returned by string methods.
Students type their answer here.
2. Selection and conditions
Translate boundary words carefully: at least means >=; at most means <=. In an if–elif–else chain, place broader overlapping thresholds after stricter ones because the first true branch wins.
Which condition accepts a number outside the inclusive range 5 to 12?
- Anumber < 5 or number > 12
- Bnumber <= 5 and number >= 12
- Cnumber >= 5 or number <= 12
- Dnot number == 5
A chain tests score >= 40 before score >= 70. Explain the resulting logic error and give the corrected order.
Use the first-true-branch rule.
Students type their answer here.
3. While loops
A terminating loop needs an initial value, a continuation condition and an update. Trace the current value through the body, apply the update, then test again. Include a starting value that makes the condition false when checking zero-pass behaviour.
count = 2
while count gap 1 8:
print(count)
count = count gap 2 2- +
- -
- <
- >
For the completed loop, state every output and the final value of count.
Trace a pass for each true condition, then include the value that makes it false.
Students type their answer here.
4. Integrated programming task
Input a text command. While its cleaned lowercase form is not stop, output the cleaned command in uppercase and request another command. The sentinel must not be output.
It will be tested with go, WAIT, stop, and with STOP immediately. This task integrates string methods, comparison and condition-controlled repetition.
# Construct the command loop.
5. Review the solution
Evidence of a strong solution includes correct behaviour across contrasting tests and code whose indentation, identifiers and structure reveal the algorithm. A program that works only for the demonstrated values is not sufficiently general.
Give one boundary or zero-pass test for the integrated program and explain the fault it could expose.
Connect the input to an observable expected result.
Students type their answer here.
Which statement best describes the series progression?
- AStrings replace the need for conditions.
- BConditions choose routes; a while loop re-tests a condition to control repetition.
- CEvery selection must be placed inside a loop.
- DLogical operators can be used only in truth tables.
Series complete
You have practised string manipulation, relational and logical operators, one-way and multi-branch selection, readability, and condition-controlled repetition. Later CT series revisit these constructs in lists, validation, searching, files and larger problems.