Homeschool Guide: These lesson plans are a guide for parents. Content may contain errors — always cross-reference with official exam board specifications.
programming constructs
FoundationHigherAll Boards
4 detailed 50-minute lessons with teaching scripts, worked examples, parent guides, and assessment criteria.
Lesson Overview
Total Lessons: 4 Tier: Foundation and Higher Duration: 50 minutes per lesson (200 minutes total) Exam Boards: AQA, Edexcel, OCR, Eduqas, CCEA
Learning Objectives
Explain the key ideas of programming constructs
Apply programming constructs to exam-style questions
Key vocab to pre-teach: Variable, Assignment, Sequence
Basic skills: reading the summary notes and answering the practice questions there
Materials & Equipment
Exercise book, coloured pens
Ruler
Printed revision notes (link below)
Internet for videos (see Resources)
Lesson 1: Introduction: programming constructs
Duration: 50 minutes
Starter Activity (5 minutes)
Quick Recall
Write down everything you already know about programming constructs. Then check against the key terms: Variable, Assignment, Sequence. Use a mini-whiteboard or paper.
Main Content (35 minutes)
Parent/Teacher Guide: Before lesson: Read the script below. Pre-teach key vocab: Variable, Assignment, Sequence. If stuck: Re-read the revision notes (link above), then break the content into smaller steps. Extension: See the Stretch & Challenge ideas in Lesson 4.
Teaching Script (35 mins): Mins 0-5 - Hook: "Today: programming constructs. By the end you will be able to answer exam questions on it unaided. It connects to the rest of Computer Science because the ideas here recur across the spec." Mins 5-20 - Direct Instruction: Work through the core ideas below one at a time; after each, ask your student to explain it back in their own words. Mins 20-30 - Guided Practice: Model the worked example together, then let your student attempt the first practice question with guidance. Mins 30-35 - Independent Practice: 2-3 practice questions from Lesson 3 below, with immediate feedback.
First Look
Start with the revision notes summary, then attempt: Explain the difference between a variable and a constant.
Plenary (5 minutes)
Check Out
Your student states one thing they learned and one question they still have about programming constructs.
Lesson 2: Core Concepts: programming constructs
Duration: 50 minutes
Starter Activity (5 minutes)
Review Previous Lesson
Quick recap: write 3 key points from Lesson 1 on programming constructs. Check them against the notes below.
Main Content (35 minutes)
Variable: A named storage location in memory whose value can change during program execution. Constant: A named value that cannot be changed once it has been set.
Assignment: means storing a value in a variable. The variable name goes on the left, the value or expression goes on the right. The previous value is overwritten.
Sequence: means executing instructions one after another in order, from top to bottom. This is the simplest programming construct - every program uses sequence.
Selection: allows a program to choose between different paths based on a condition. The three forms are: IF...THEN, IF...THEN...ELSE, and CASE/SWITCH.
Iteration: means repeating a block of code. There are three types: count-controlled (FOR), condition-controlled (WHILE), and post-condition (REPEAT...UNTIL).
Nesting: means placing one construct inside another. You can put IF statements inside loops, loops inside IF statements, or loops inside other loops. This allows complex logic.
Term
Meaning
Example
Value can change?
Yes
No
When to use
Values that need updating (score, counter)
Fixed values (PI, tax rate, max attempts)
Example
score ← 0, then score ← score + 1
CONST PI ← 3.14159
Advantage
Flexible - can be updated
Prevents accidental changes, makes code readable
Best for
Range checks, complex conditions
Checking specific values of one variable
Conditions
Can combine multiple variables
One variable only
Example
IF age >= 18 AND hasID THEN
CASE OF menuChoice
When to use
Known number of repetitions
Unknown, may run 0 times
Practice (10 minutes)
Q: Explain the difference between a variable and a constant.
Answer: A variable is a named memory location whose value can change during execution. A constant is a named value that cannot be changed once set. Constants prevent accidental changes and make code more readable.
Plenary (5 minutes)
Explain Back
Your student teaches the key points back to you without looking. Fill any gaps immediately.
Lesson 3: Application: programming constructs
Duration: 50 minutes
Starter Activity (5 minutes)
Quick Recall
Recall the key terms: Variable, Assignment, Sequence. Define each in one sentence.
Main Content (35 minutes)
Parent/Teacher Guide: Let your student attempt each question alone first, then compare with the model answer. Award method marks for correct working even if the final answer is wrong.
Q1: Explain the difference between a variable and a constant.
Answer: A variable is a named memory location whose value can change during execution. A constant is a named value that cannot be changed once set. Constants prevent accidental changes and make code more readable.
Q2: Write pseudo-code that asks for a number and outputs "Positive", "Negative", or "Zero" using selection.
Answer: INPUT number IF number > 0 THEN OUTPUT "Positive" ELSEIF number < 0 THEN OUTPUT "Negative" ELSE OUTPUT "Zero" ENDIF
Q3: When would you use a REPEAT...UNTIL loop instead of a WHILE loop?
Answer: Use REPEAT...UNTIL when the loop body must execute at least once (e.g. input validation). Use WHILE when the loop may need to execute zero times (e.g. searching a list that might be empty).
Q4: Write pseudo-code using a FOR loop to output all multiples of 3 from 3 to 30.
Answer: FOR i ← 3 TO 30 STEP 3 OUTPUT i NEXT i
Q5: Write pseudo-code that keeps asking for a password until the user enters "open123", then outputs "Welcome".
Review any questions answered incorrectly. Identify whether the error was knowledge, method, or reading the question.
Lesson 4: Exam Practice: programming constructs
Duration: 50 minutes
Starter Activity (5 minutes)
Command Words
Review what these command words require: state (one point), describe (say what happens), explain (say why), compare (both sides), evaluate (judgement).
Main Content (35 minutes)
Extended Answer
Extended question: Full-Mark Response Write pseudo-code for a program that asks a user to enter a password. The password must be at least 8 characters long and contain at least one digit. The program should keep asking until a valid password is entered, then output 'Password accepted'. [5 marks] <div class="
valid ← FALSE WHILE valid = FALSE INPUT 'Enter password: ', password IF LENGTH(password) >= 8 THEN found_digit ← FALSE FOR i ← 0 TO LENGTH(password) - 1 IF password[i] >= '0' AND password[i]
Exam Tips: Always close your constructs: ENDIF, ENDWHILE, NEXT, ENDCASE | Use constants (CONST) for values that should never change | Choose the right loop: FOR for counted, WHILE for pre-condition, REPEAT for post-condition | WHILE checks before running; REPEAT checks after - know the difference | Indent nested constructs to show structure clearly | Remember: sequence, selection, and iteration are the THREE basic constructs
Common Errors: ✗ Using IF instead of WHILE for repeated actions ✓ IF executes once based on a condition; WHILE repeats as long as the condition is true. Use IF for decisions, WHILE for repetition. ✗ Thinking FOR and WHILE loops are interchangeable in all situations ✓ FOR loops are for counted iteration (known number of repeats); WHILE loops are for conditional iteration (unknown number of repeats until a condition is met). ✗ Forgetting that WHILE checks the condition BEFORE the loop body, so it may never execute ✓ A WHILE loop is pre-tested: if the condition is FALSE initially, the loop body never executes. A REPEAT-UNTIL loop is post-tested and always executes at least once. ✗ Confusing ELSE and ELSEIF/EL
Stretch & Challenge (Grade 8-9):
Synoptic links: explain how programming constructs connects to another Computer Science topic you have studied
Real-world: research one real-world use or example of programming constructs
Critical: "What are the limitations of the models used in programming constructs?"
Plenary (5 minutes)
Assessment Criteria
Got it: Confident explanation + correct worked examples
Getting there: Main points OK, needs support with detail
Not yet: Confused on key concepts - re-run Lesson 2
Homework & Consolidation
Consolidation: Re-answer any Lesson 3 practice questions answered incorrectly (20 mins)
Retrieval: Write flashcards for the key terms: Variable, Assignment, Sequence (10 mins)
Exam practice: One past-paper question on programming constructs from the board websites (15 mins)
Extension: Explain programming constructs to someone else in your own words (10 mins)