Intermediate
40 mins
Teacher/Student led
+95 XP

Pseudo-code and Flow Charts: Plan It, Then Build It

Write a quiz algorithm as pseudo-code and as a flow chart, build and match-check it in Scratch, then extend the plan, swap with a classmate, and flag where the wording needs to be more precise.

Teacher Class Feed

Load previous activity

    1 - Start ~4 mins

    Illustration for StartEarlier you used the four steps of computational thinking to break a build down and make it. One of those steps was algorithms: writing the steps of a solution in order.

    Today you learn two ways coders write an algorithm down before they touch a block: pseudo-code (plain steps in order) and a flow chart (the same plan drawn as boxes and arrows). You will plan a small quiz, then build it in Scratch and check the program matches the plan.

    2 - Two Ways to Write a Plan ~5 mins

    Quiz plan as a flow chart

    An algorithm is a clear set of steps that solve a problem. Coders write it down before they build, so anyone reading the plan knows exactly what should happen, and so they know exactly what to build.

    Today you will write the same plan two ways:

    • Pseudo-code: plain words, one step per line. Not a real programming language, just precise enough that someone else could follow it.
    • Flow chart: the same plan drawn as shapes and arrows (your teacher will point out each shape on the sample).

    Here is the plain-English idea you will plan and build today:

    A sprite asks for a name and greets them. It then asks how many counties are in Ireland. If the answer is 32, the score goes up by 1 and it says "Correct!". If not, it says "Not quite".

    Here is that idea as sample pseudo-code you can imitate:

    1. START
    2. SET score to 0
    3. ASK for a name
    4. SAY hello using the name
    5. ASK how many counties are in Ireland
    6. IF the answer equals 32 THEN
    7. change score by 1
    8. SAY Correct!
    9. ELSE
    10. SAY Not quite
    11. END

    The flow chart shown on this step, just below, shows the same plan drawn as shapes. Notice the diamond is the decision: yes goes one way, no goes the other.

    3 - Hands-on: Write the Plan ~7 mins

    Turn the quiz idea into a plan on paper or in a notes file. Use the sample as a model.

    1. Write the pseudo-code. Write the quiz as ordered steps. Every action and every decision needs its own line. You must include SET score to 0, the counties question, the check for 32, the score change, and both messages. Include the name and greeting as well if you can.
    2. Draw the flow chart. Redraw the same plan as shapes and arrows. Use an oval for start and end, rectangles for actions, and a diamond for the yes-or-no check on the answer. Label the arrows out of the diamond with yes and no.
    3. Get something running early. As soon as you have at least two solid pseudo-code lines (for example SET score and ASK name), open a new Scratch project and place those blocks so something already runs. Come back to finish the rest of the plan, then add the remaining blocks in the next step.
    Exploration

      4 - Hands-on: Build and Check the Match ~9 mins

      Build your plan in Scratch and check the program matches it. This is testing and debugging: you are checking the program against the plan and fixing mismatches.

      Core finish line: counties question, if-else that runs both paths, and a quick line-by-line match against your plan. Name and greeting only if you still have time.

      1. Build the decision path in Scratch. Open a new Scratch project (or continue the one you started). Set score to 0 at the start, ask the counties question, and use an if-else so the program follows your plan. Keep your plan beside the screen.
      2. Run both paths. Run it once with the right answer (32) and once with a wrong answer. Both paths should match what your plan says.
      3. Check the match. Read your pseudo-code line by line against the blocks. If a step is in the plan but missing from the program, add it. If a block does something the plan never said, fix the plan or the program so they agree.
      4. If time: add the name and greeting path so it matches the rest of your plan.
      Exploration

        5 - Your Turn: Extend, Swap, and Flag ~9 mins

        Required for everyone: extend your plan, swap with a classmate, and flag one unclear step. Building their plan is only if you finish those three with time left.

        1. Extend your plan (pseudo-code only, about four minutes). Take the plan from earlier and add exactly one option from this list. Rewrite the full short plan so a classmate could build the whole thing without asking you. You do not need a new flow chart in this step.
          • a second yes-or-no quiz question
          • a lives variable that drops by 1 on a wrong answer
          • ask whether they are on a team and say different things for yes and no

          Before → after example if you choose lives (keep the original path and add the new bits):

          Before (fragment):

          1. ASK how many counties are in Ireland
          2. IF answer equals 32 THEN SAY Correct! ELSE SAY Not quite

          After (full short plan a classmate can build):

          1. START
          2. SET lives to 3
          3. ASK how many counties are in Ireland
          4. IF answer equals 32 THEN SAY Correct! ELSE change lives by -1 and SAY Not quite
          5. END
        2. Swap plans. Give your pseudo-code to a classmate and take theirs.
        3. Flag one precise fix (everyone). On the plan you were given, write one place that needed to be clearer (a missing decision, a vague action, or a step in the wrong order). Hand the plan back with that note. Stop here unless your teacher says you have spare minutes.
        4. Early finishers only: build their plan. If the flag is done and minutes remain, build their plan from scratch exactly as written. Do not improve it and do not guess. Aim to get at least as far as the decision diamond running.

        Save your Scratch project the way your teacher just showed you before you stop.

        123learn · Online learning platform

        Unlock the full learning experience

        You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.

        Hundreds of curriculum-aligned lessons
        Interactive activities in every lesson
        Printable resources & progress tracking
        Copyright Notice
        This lesson is copyright of Coding Ireland 2017 - 2025. Unauthorised use, copying or distribution is not allowed.
        🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more