Study Guide Instructor view
Flowcharts and Pseudocode
Teaching notes for Lesson 5.2, with controls for presenting it.
Keep this page on your own screen. Share only the lesson window. The lesson window holds no teaching notes, so sharing it cannot show them.
Presenting
- Open the lesson in its own window and share that window, not this one.
- Use Next and Previous here, or the lesson’s own, to move through the lesson. Next reveals one thing at a time: the next idea, or the answer to the question on screen, then the next step. Previous takes the last reveal back. The line below says what is on screen and what Next will show.
- Reveal hints and answers when the class is ready, and reset a demonstration before using it again.
The controls need JavaScript and a browser that supports BroadcastChannel. Without them, open the lesson in presentation mode and use its own controls.
The two windows talk to each other only inside this browser, on this device. Nothing is sent to a server, and no account is needed. A second device (a phone or another tablet) cannot follow the lesson window yet.
Now on the lesson window
- On screen
- Next teaching point
Guidance for this point
Lesson plan
- Level
- Beginner
- Time
- About 60 minutes; the steps below add up to 60
Pupils start from a rule that sounds clear (children pay £1, adults £2) and discover that it cannot yet be coded, because child is not a number. From there they meet precise conditions, guess the meaning of flowchart shapes before they are named, follow a flowchart with a trace table, read Cambridge pseudocode cold, and then apply, correct and write both forms. The edge value 15 recurs throughout so that pupils see why one comparison symbol is right and its neighbour is wrong.
Objectives
- Explain why an algorithm must be written precisely, and rewrite a vague condition using symbols
- Name the standard flowchart symbols and say what each is for
- Follow a flowchart and a piece of pseudocode with given inputs and record what it outputs
- Match each line of simple pseudocode to its flowchart symbol
- Spot and correct lines of pseudocode that break the conventions
- Write a short algorithm as pseudocode and as a flowchart
Before the lesson
- Mini whiteboards, one per pupil, for think questions and for holding up the answer to each trace row.
- Write the seven-box fare flowchart on the board as a drawn chart (the lesson gives it as a table) so that you can trace it with the pen.
- Print or display the symbol table (oval, parallelogram, rectangle, diamond, flow line) and the comparison-symbol table side by side.
- Optional: a strip of paper with the sentence Anyone older than 15 pays £2 to cut into words, so that pupils can see how a rule is read in two ways.
Steps
Introduction Opening
On the lesson window now
On screen: the lesson’s title, module and number; Next adds its objectives and key terms, as the lesson page lists them; Next again begins the first step.
Objectives on screen
- Explain why an algorithm must be written precisely, and rewrite a vague condition using symbols
- Name the standard flowchart symbols and say what each is for
- Follow a flowchart and a piece of pseudocode with given inputs and record what it outputs
- Match each line of simple pseudocode to its flowchart symbol
- Spot and correct lines of pseudocode that break the conventions
- Write a short algorithm as pseudocode and as a flowchart
Purpose: Pupils start from a rule that sounds clear (children pay £1, adults £2) and discover that it cannot yet be coded, because child is not a number. From there they meet precise conditions, guess the meaning of flowchart shapes before they are named, follow a flowchart with a trace table, read Cambridge pseudocode cold, and then apply, correct and write both forms. The edge value 15 recurs throughout so that pupils see why one comparison symbol is right and its neighbour is wrong.
1. A fare the app must get right Think 4 min
On the lesson window now
Purpose: Pupils discover for themselves that an everyday rule is not yet an algorithm: it hides a decision (where does child end?) that a machine cannot guess.
Ask
- Could you write the ticket machine from this rule alone?
- What does the machine need that the rule does not say?
- A passenger is 15: what is charged, and would two programmers agree?
Responses to expect
- Child needs an exact age
- Some will pick 15 and some 16
- A few will say the machine can just look at the person
Misconceptions to challenge
- A learner may believe: “Everyone knows what a child is, so the computer will too.” Respond: Ask what a computer can compare. It can compare numbers, so child has to be turned into a number.
What learners should notice
- Different pupils will choose different cut-off ages; that disagreement is the point.
Checking understanding: Pupils write their last child age on a mini whiteboard; the spread shows how needed a precise rule is.
Depending on the answers
- If all pupils pick the same age: ask them what a passenger of the next age up would be charged, and whether the rule says so clearly.
English as an additional language
- Check the words fare, passenger and ticket machine; draw a bus with a ticket machine.
Discussion pause: Thirty seconds of silent thinking, then each pupil writes down the age they would choose as the last child age.
In the lesson window
- Think it through: Could the programmer write the ticket machine from the rule “Children pay £1 and adults pay £2”? What does the machine need to know that the rule does not say?
2. Being exact Discover 6 min
On the lesson window now
Purpose: Pupils work out the difference between older than 15 and 15 or older at exactly 15, then meet the six comparison symbols as the exact way to write each version.
Ask
- Rule A and rule B for a 15-year-old: which fare does each give?
- Which condition is true when Age is 16?
Responses to expect
- A gives £1, B gives £2
- Age > 15 is the only true one for 16
Misconceptions to challenge
- A learner may believe: “Older than 15 and 15 or older mean the same.” Respond: Test 15 in both: is 15 older than 15? The two rules differ at exactly one age.
- A learner may believe: “= in a condition stores a value.” Respond: In a condition = asks whether two things are equal. Storing comes later, with the arrow.
- A learner may believe: “< and <= point the same way, so are interchangeable.” Respond: Ask: is 15 less than 15? Is 15 less than or equal to 15? The or equal to makes 15 count.
On the board or with the pen
- Draw a number line from 13 to 17 and shade the ages that make each of the six conditions in the table true for 15.
Checking understanding: The which-is-true question: each wrong option picks a symbol that fails for 16; the feedback prompts the pupil to test each one.
Depending on the answers
- If pupils guess without testing: make them substitute 16 into each condition aloud: is 16 less than or equal to 15?
- If pupils are secure: ask which two conditions are true for 15 but false for 16, and why.
Support
- Give pupils a card with the six symbols and their words; they match before they test.
English as an additional language
- Teach greater and less with the mouth of the symbol opening towards the bigger number; check or equal to.
In the lesson window
- Think it through: Rule A says “older than 15 pays £2”. Rule B says “15 or older pays £2”. A passenger is exactly 15. Which fare does each rule give, and what does the difference tell you about the wording?
- Check your understanding: A passenger’s age is 16. Which condition is true?
3. A picture of the algorithm Predict 7 min
On the lesson window now
Purpose: Pupils guess what the shapes do from the table of boxes before the standard symbols are named, then check the count of arrows leaving a decision.
Ask
- Which shape is the question with two ways out?
- Which shapes mark the beginning and end, and which show data in and out?
- How many arrows leave a decision, and how are they labelled?
Responses to expect
- Diamond; ovals; parallelograms
- Rectangles do a piece of work
- Two, labelled Yes and No
Misconceptions to challenge
- A learner may believe: “Every box has exactly one arrow out.” Respond: A decision asks a question; it needs one way out for each answer. Ask what one arrow would mean.
- A learner may believe: “A decision can have three outcomes: less than, equal or greater.” Respond: A condition is true or false, so two answers. Three-way outcomes are made from more than one decision.
- A learner may believe: “The oval is a decision.” Respond: The oval only marks the start and the stop; a decision has two arrows out.
On the board or with the pen
- Draw the fare flowchart with the pen as you read the table, using real shapes and labelling the diamond Yes and No.
What learners should notice
- The STOP oval has no arrow out; every other box has at least one.
Checking understanding: The arrows-out question separates pupils who think one arrow from those who think three.
Depending on the answers
- If pupils choose one arrow: ask which box in the fare chart has a choice, and how many places the chart can go from there.
Support
- Colour each shape in the table to match the board drawing so that pupils can match them by colour first.
English as an additional language
- Say each shape by its name in the table and point as you say it: oval, parallelogram, diamond, rectangle.
In the lesson window
- Think it through: Without being told, guess: what job does each shape seem to do? In particular, which shape is the question with two ways out, which shapes mark the beginning and end, and which shape shows data going in or coming out?
- Check your understanding: How many arrows leave a decision diamond, and how are they labelled?
4. Following the arrows Experiment 8 min
On the lesson window now
Purpose: Pupils follow the flowchart by hand for four ages and fill in a trace table, so that the idea of tracing is met before it is formalised, and the edge case 15 is shown to matter.
Ask
- Start at box 1 for each row: what happens for age 9? And for 15?
- Why is the row for 15 a useful one to include?
Responses to expect
- Yes, fare 1, output 1 for ages 9 and 15
- No, fare 2, output 2 for 16 and 40
- 15 sits on the edge of the condition
Misconceptions to challenge
- A learner may believe: “15 gives the adult fare because it is about to become an adult.” Respond: Substitute 15 into Age <= 15: it is equal, so the condition is true and the fare is 1.
- A learner may believe: “Each row carries on from the previous one.” Respond: Each row is a separate passenger; the algorithm starts again at box 1.
- A learner may believe: “The age 15 is just another example.” Respond: Ask what would happen at 15 if the symbol were < instead of <=.
On the board or with the pen
- Draw four columns on the board (Age, Age <= 15?, Fare, OUTPUT) and fill row 15 together by following the arrows with the pen.
Checking understanding: The fare-trace table cell by cell: the 15 row shows who has read <= correctly. The check on why 15 is useful shows who sees the edge idea.
Depending on the answers
- If pupils write No for age 15: have them read the symbol aloud as less than or equal to and substitute 15 again.
- If pupils finish early: ask them to trace Age < 15 for the same four ages and say which rows change.
Stretch
- Which single age would show that the manager's original rule (older than 15 pays £2) and the machine disagree?
English as an additional language
- Say trace as follow with your finger; show a finger tracing the arrows on the board.
In the lesson window
- Check your understanding: Why is the row for age 15 a useful one to put in the trace table?
5. The same algorithm in words Predict 7 min
On the lesson window now
Purpose: Pupils read pseudocode cold, using the flowchart they know, before the conventions are listed, then match IF to the decision diamond.
Ask
- What do you think each line does? What might the arrow ← mean?
- Which flowchart symbol matches the line IF Age <= 15?
Responses to expect
- INPUT asks for the age; IF tests; THEN and ELSE are the two paths
- The arrow puts a value in
- A diamond
Misconceptions to challenge
- A learner may believe: “← is the same as =.” Respond: The arrow is an instruction: store this. = asks a question. Fare = 1 asks if Fare holds 1, Fare ← 1 puts 1 in it.
- A learner may believe: “THEN and ELSE run one after the other.” Respond: Only one of them runs. Ask which one runs for age 9 and which for 40.
- A learner may believe: “Names can be written any way, since it is not real code.” Respond: Cambridge names start with a capital for each word: Age, Fare, TicketPrice. Keywords are in capitals.
On the board or with the pen
- Write the pseudocode in a column and draw arrows linking each line to the flowchart box it matches.
What learners should notice
- Indentation shows what belongs to THEN and ELSE; ENDIF closes the IF.
Checking understanding: The match-the-if question: the rectangle option catches pupils who think any line that mentions Age changes it.
Depending on the answers
- If many choose the rectangle: ask: does the IF line store a new value, or ask a question about Age?
Support
- Provide the pseudocode with each line printed next to its flowchart box; pupils annotate the link in colour.
English as an additional language
- Check the words keyword, indentation and arrow; point to examples in capitals.
In the lesson window
- Think it through: You have not been taught this notation yet, but you have seen the flowchart. Read the pseudocode line by line and write what you think each line does. What do you think the arrow ← means?
- Check your understanding: Which flowchart symbol matches the line IF Age <= 15 in the pseudocode?
6. Matching lines to shapes Experiment 4 min
On the lesson window now
Purpose: A quick sort of four lines into their flowchart shapes, so that the link between the two forms is made without help.
Ask
- Which shape does Fare ← 2 become?
- INPUT and OUTPUT: same shape or different?
Responses to expect
- Rectangle
- The same, the parallelogram
Misconceptions to challenge
- A learner may believe: “INPUT uses a different shape from OUTPUT.” Respond: Both mean data crosses the edge of the algorithm, so both use the input/output symbol.
Checking understanding: Scan the table for the Fare ← 2 row: a diamond or parallelogram answer shows the process-versus-decision split is still unclear.
Depending on the answers
- If pupils mix up rectangle and diamond: ask: is a value being stored or a question being asked? Re-read the symbol table.
Support
- Allow the symbol table to be open while they answer.
7. Following pseudocode Apply 8 min
On the lesson window now
Purpose: Pupils predict a till program's output for a pupil who cannot pay, trace three runs, and explain why exact money gives 0 and not an error.
Ask
- A pupil buys a 120 pence snack with 100 pence. What happens, line by line?
- In the third row the money matches exactly: why is the output 0?
Responses to expect
- Change is -20, so Not enough money
- 0 is not less than 0, so the ELSE branch runs
Misconceptions to challenge
- A learner may believe: “Change is Price minus Money.” Respond: Read the line: Money - Price. Substitute 100 and 120 in that order.
- A learner may believe: “A negative change is output as the number.” Respond: Ask which branch the condition Change < 0 sends a negative number to.
- A learner may believe: “0 means not enough money.” Respond: The condition is strictly less than, so 0 does not satisfy it. Ask what Change < 0 says about 0.
On the board or with the pen
- Write the three runs as rows (Price, Money, Change, OUTPUT) and test Change < 0 for each with the pen.
Checking understanding: The predict-the-till question has four options, one for each plausible slip: the wrong sign, reversed subtraction, the right branch, and no output at all.
Depending on the answers
- If pupils choose -20: trace again slowly, asking after the subtraction which branch runs.
- If pupils choose 20: ask them to read the subtraction line aloud and substitute the numbers.
Stretch
- Change the condition to Change <= 0 and trace the 80 and 80 row. What would the till do, and would it be right?
English as an additional language
- Check pence and change; show coins on the board.
In the lesson window
- Apply it: A pupil buys a snack costing 120 pence but has only 100 pence. What does the program output?
- Check your understanding: In the third row the pupil has exactly the right money. Why does the program output 0 and not “Not enough money”?
8. Mistakes in the pseudocode Apply 6 min
On the lesson window now
Purpose: Pupils correct someone else's pseudocode, naming each convention it breaks: a condition in words, = for storing, a missing ENDIF.
Ask
- Which of Sam's lines would lose marks, and why?
- Rewrite Sam's program correctly.
Responses to expect
- The condition in words, = as assignment, no ENDIF
- Some also notice no OUTPUT
Misconceptions to challenge
- A learner may believe: “Fare = 2 is fine because it is what is written in most books.” Respond: In pseudocode = is the question; the arrow is the instruction. Python does use = to store, which is why the mistake is common.
- A learner may believe: “The missing ENDIF does not matter if the layout is clear.” Respond: Every IF must be closed by its own ENDIF; the layout does not replace it.
- A learner may believe: “The fares are the wrong way round.” Respond: For Age > 15 the higher fare is correct, so swap nothing: trace age 20.
On the board or with the pen
- Write Sam's code on the board and circle each fault in a different colour as pupils find it.
Checking understanding: The sams-pseudocode question: each wrong option misreads one convention; the feedback sends pupils back to the three conventions in the notes.
Depending on the answers
- If pupils fix only the ENDIF: ask them to read the condition line aloud as examiners would and compare with the symbol table.
- If pupils find all three at once: ask them to find the fault the notation list does not cover (the missing OUTPUT).
Support
- Give a checklist: condition, assignment arrow, ENDIF, output.
In the lesson window
- Apply it: Sam’s pseudocode has problems with its notation. Which answer lists every one of them?
9. Write one yourself Apply 6 min
On the lesson window now
Purpose: Pupils write pseudocode from a description, then describe the matching flowchart, and choose the pseudocode that matches a given flowchart.
Ask
- Write the pass or fail program for a mark out of 50.
- Which symbol includes 25 itself?
- Which pseudocode matches the cinema flowchart, and which outputs sit on Yes and No?
Responses to expect
- IF Mark >= 25
- Mark > 25 would fail a 25
- Allowed on the Yes arrow with Age >= 12
Misconceptions to challenge
- A learner may believe: “Pass is above 25, so use >.” Respond: Test 25: is it a pass? 25 or more means >=.
- A learner may believe: “Which output goes with THEN does not matter.” Respond: THEN is the Yes arrow. Swapping the outputs would tell a 12-year-old they are not allowed.
- A learner may believe: “The flowchart needs a decision for each output.” Respond: One decision with two arrows is enough.
On the board or with the pen
- Draw the pass or fail flowchart from the pupils' pseudocode, shape by shape.
Checking understanding: Collect the written pseudocode: check the symbol, the arrow, the ENDIF and the capitals before the cinema question.
Depending on the answers
- If pupils write > 25: give them the exact mark 25 and ask what their program outputs.
Support
- Provide the first and last lines of the pseudocode and ask pupils to fill the middle.
Stretch
- Add a distinction: 40 or more outputs Merit. How many decisions does the flowchart now need?
In the lesson window
- Think it through: Write this as Cambridge pseudocode: input the mark, then output “Pass” if it is 25 or more and “Fail” otherwise. Then say, in words, how its flowchart would look: which shapes, in order.
- Apply it: A fictional cinema’s flowchart reads: START; INPUT Age; a decision Age >= 12 ? with Yes leading to OUTPUT “Allowed” and No leading to OUTPUT “Not allowed”; STOP. Which pseudocode matches it?
10. Show what you know Consolidate 4 min
On the lesson window now
Purpose: Pupils explain why symbols beat sentences, compare the two notations, and apply a condition to a library rule before the summary.
Ask
- Why say Age > 15 and not age is greater than 15?
- What does a flowchart show better than pseudocode, and the reverse?
- Which condition means fewer than 5?
Responses to expect
- Symbols have one meaning
- A flowchart shows paths at a glance; pseudocode is compact and close to code
- Books < 5
Misconceptions to challenge
- A learner may believe: “Fewer than 5 is Books <= 5.” Respond: Test a pupil with exactly 5: do they get another book?
- A learner may believe: “Words are fine if the meaning is right.” Respond: Examiners expect the symbol; the meaning also has to be exact.
Checking understanding: Collect the explanations: the best name the edge value and say the symbol removes ambiguity.
Depending on the answers
- If pupils choose <= 5: ask them to try 5 books in both conditions and read the library rule again.
- If several are unsure of the six symbols: begin the next lesson with a two-minute quiz: which of the six is true for 4, 5 and 6?
In the lesson window
- Think it through: Explain to someone new why an algorithm for an exam or for a computer should say Age > 15 rather than “age is greater than 15”, and say one thing that a flowchart does better than pseudocode and one thing that pseudocode does better.
- Apply it: A fictional library lets a pupil borrow another book only when they have borrowed fewer than 5. Which condition is correct for the pseudocode, with Books holding how many they have borrowed?
Lesson recap Closing
On the lesson window now
On screen: the lesson’s objectives again; Next adds the closing question, which asks the class to explain each one in their own words without looking back. It says nothing about what anyone has learnt: use the answers to decide what to revisit.
Points to listen for
- An algorithm must be exact: conditions use =, <, <=, >, >= and <> and not everyday words.
- Test the value on the edge of a condition; it exposes the wrong symbol.
- Flowchart shapes: oval start and stop, parallelogram input and output, rectangle process, diamond decision with Yes and No.
- Pseudocode: keywords in capitals, ← to store, indentation, every IF closed by ENDIF.
- A trace table follows an algorithm by hand: ← stores, = asks.
Consolidation
- An algorithm must be exact: conditions use =, <, <=, >, >= and <> and not everyday words.
- Test the value on the edge of a condition; it exposes the wrong symbol.
- Flowchart shapes: oval start and stop, parallelogram input and output, rectangle process, diamond decision with Yes and No.
- Pseudocode: keywords in capitals, ← to store, indentation, every IF closed by ENDIF.
- A trace table follows an algorithm by hand: ← stores, = asks.