How to use it. In Run, choose a flowchart, type its input values (separated by commas) and press Step to run one box at a time, or Run to watch it go. The box being run is lit up and the line just taken is highlighted. The trace table records every value as it changes, and the outputs appear below it. In Build, change a flowchart or make your own: each box's type, its words, and where its lines go. Challenges asks you to predict outputs and to find the mistake in a flowchart.
The symbols
- Terminator (rounded): START and STOP. Every flowchart has one START.
- Process (rectangle): a calculation or an assignment, such as
Total ← Total + Mark.
- Input/output (parallelogram):
INPUT Mark, OUTPUT "Total: ", Total.
- Decision (diamond): a question with two exits, Yes and No. A decision whose line goes back up to an earlier box makes a loop (iteration).
Lines (flow lines) have arrows showing the order. Assignment is written with ← (here <- works too). Text in quotes is output as it is; the items in an OUTPUT are output one after another.
Tracing
A dry run works through an algorithm by hand, recording each variable in a trace table: a new value goes in the variable's column when it changes, and anything output goes in the OUTPUT column. It shows what an algorithm does and finds logic errors, such as a comparison the wrong way round, a variable never increased, or a loop that runs once too often or too few times (an off-by-one error). Test with normal, boundary (such as exactly 50 for a pass mark of 50) and extreme or invalid data.
Common exam mistakes: forgetting to initialise a total or counter (set it to 0 before the loop); adding the rogue value (such as −1) into the total; using > where the question means ≥; a decision with only one exit, or exits not labelled Yes and No; and no STOP.
Objective: Cambridge International AS & A Level Information Technology (9626), algorithms: flowcharts with sequence, selection and iteration, tracing them with test data, and finding and correcting errors. Also useful for IGCSE ICT (0417).
Where this fits
- AP: AP Computer Science Principles
- Cambridge: Cambridge IGCSE Computer Science (0478); Cambridge A Level Computer Science (9618); Cambridge AS Level Computer Science (9618); Cambridge A Level Information Technology (9626); Cambridge AS Level Information Technology (9626)
- IB: IB Computer Science HL; IB Computer Science SL
- NCEA Level 1 Digital Technologies: 92004 Create a computer program; 92004 Create a computer program Goes beyond 92004: 92004 assesses writing a program; this teaches the constructs and testing through flowcharts, not coding.
Goes beyond 92004: 92004 assesses writing a program; this teaches the constructs and testing through flowcharts, not coding.
- Pearson Edexcel International: Edexcel International GCSE Computer Science (4CP0); Edexcel International A Level Information Technology
- USDP: USDP Computer Science