LightMySky

Writing an Algorithm Down: Flowcharts and Pseudocode

An algorithm can be recorded before any code exists, as a flowchart or as pseudocode. Both fix the order, the decisions and the repetitions, so the plan can be checked on paper and argued about with someone else.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Draw a flowchart for a task with at least one decision and one repetition, using the right shape for each
  • Write the same algorithm as pseudocode and show the two agree step for step
  • Find a missing or out-of-order step by walking the flowchart with a test value

1 · Read

An algorithm can be recorded before any code exists, as a flowchart or as pseudocode, like the strange programs you just read. Both fix the order, the decisions, and the repetitions. A plan on paper can be checked with a friend long before any code runs.

Try it together

Pseudocode writes the plan in plain words, one short command per line, with capitals for actions. To ask for a password until it is right: ASK the user for the password. WHILE the password is wrong, ASK again. PRINT welcome. Indent the lines inside the loop so the repeat shows.

A flowchart draws the same plan with shapes. Ovals mark start and end, rectangles hold actions, diamonds hold decisions, arrows fix the order. The password loop becomes: ask, then a diamond asking if it is right, with a no arrow looping back to ask. Both forms must agree step for step.

Walk the plan with a test value, doing exactly what each line says. Try a wrong password first, then the right one. A missing ASK inside the loop, or two steps in the wrong order, shows up at once on paper.

Write the steps in plain words or shapes, then walk them with a test value.

2 · Watch

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Where this leads

Jobs that lean on this skill. Follow one to see everything it is built on.

Then practise

8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Writing an Algorithm Down: Flowcharts and Pseudocode · Computing, ages 13 to 14 · LightMySky