You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson covers flowcharts as a method for representing algorithms, as required by OCR J277 Section 2.1. Flowcharts are a visual way to show the step-by-step logic of an algorithm, including decisions and loops.
A flowchart is a diagram that represents an algorithm using standard symbols connected by arrows (flow lines). Flowcharts show the sequence of steps, decision points, and flow of control in an algorithm.
Flowcharts are useful because they:
You must know these standard symbols for the OCR J277 exam:
| Symbol | Shape | Purpose | Example |
|---|---|---|---|
| Terminator | Rounded rectangle (oval) | Start or end of the algorithm | "Start" / "Stop" |
| Process | Rectangle | A step or action | "total = total + number" |
| Decision | Diamond | A question with Yes/No (True/False) outcomes | "Is score > 50?" |
| Input/Output | Parallelogram | Receiving input or producing output | "INPUT name" / "OUTPUT total" |
| Flow line | Arrow | Shows the direction of flow between symbols | Connects symbols |
| Subroutine | Rectangle with double side lines | Call to a separate procedure/function | "CALL calculateTotal()" |
OCR Exam Tip: The most common mistake is using the wrong shape. Rectangles are for processes (calculations, assignments). Parallelograms are for input/output. Diamonds are ONLY for decisions (yes/no questions). Make sure you draw the correct shapes in the exam.
| Convention | Detail |
|---|---|
| Every flowchart has one Start and one Stop | Use terminators (ovals) |
| Arrows show direction of flow | Flow goes downward by default, with arrows indicating any changes |
| Decisions have exactly two exits | Labelled "Yes" and "No" (or "True" and "False") |
| Each symbol has one entry point | Except decisions which have one entry and two exits |
| Write inside the symbols | Instructions, conditions, or labels go inside the shapes |
| Keep it clear and neat | Use straight lines, avoid crossing arrows where possible |
Here is an example flowchart for checking whether a number is even or odd:
flowchart TD
A([Start]) --> B[/INPUT number/]
B --> C{number MOD 2 = 0?}
C -- Yes --> D[/OUTPUT 'Even'/]
C -- No --> E[/OUTPUT 'Odd'/]
D --> F([Stop])
E --> F
A flowchart to calculate the area of a rectangle:
[Start]
|
[INPUT length]
|
[INPUT width]
|
[area = length x width]
|
[OUTPUT area]
|
[Stop]
Symbols used: Terminator (Start, Stop), Input/Output (INPUT, OUTPUT), Process (calculation)
A flowchart to check if a student has passed (score >= 50):
[Start]
|
[INPUT score]
|
<Is score >= 50?>
/ \
Yes No
| |
[OUTPUT [OUTPUT
"Pass"] "Fail"]
| |
\ /
[Stop]
Symbols used: Terminator, Input/Output, Decision (diamond), Process (output)
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.