Designing an algorithm that uses logical operators with selection and iteration
A complete design where a loop repeats, IF decisions use AND, OR or NOT, and the flowchart and the pseudocode do the same job, so both versions agree.
Understanding Designing an algorithm that uses logical operators with selection and iteration in ACARA Digital Technologies Years 9–10
What it does: AND needs both parts true, so the child price applies only to under-16s on a day that is not Saturday. Checking both versions agree means the loop, decision and OR condition in the flowchart match the pseudocode exactly. The game keeps running only while neither stop rule has happened. Flipping OR to AND and reversing each test gives the continue condition. NOT loggedIn is true while the login has not yet succeeded. Without NOT, the loop would never start for a user who is not logged in. A decision inside the loop body is checked on every repeat. Placed after ENDWHILE, it would only price one customer.
Common mistakes: The game should start with 3 lives. With life ← 0 the condition life > 0 is false straight away, so the WHILE loop never runs. It should be life ← 3. A single = compares two values; it does not store one. To set the discount price the line must use the assignment arrow: price ← 8.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 492–534) and word search (Modules 459–534).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
WHILE + IF + AND/OR/NOTFill in the Blanks
Spot the Error
Student with a class code? Join your class →