Draw a flowchart from a structured English description
9.2 Algorithms – Drawing Flowcharts from Structured English
What is Structured English?
Structured English is a plain‑English style that uses a limited set of keywords (IF, THEN, ELSE, END IF, WHILE, END WHILE, etc.) to describe the logic of an algorithm. It’s like writing a recipe that a computer can follow, but still readable by humans. 🎂
Why Use Flowcharts?
Flowcharts turn those sentences into visual symbols, making the flow of control easier to spot. Think of a flowchart as a map of a city: streets (arrows) show the path, and buildings (shapes) tell you what happens at each stop. 🗺️
Common Flowchart Symbols
| Symbol | Meaning | Structured English Equivalent |
|---|---|---|
| 🟢 (Oval) | Start / End | BEGIN / END |
| 🟦 (Rectangle) | Process / Action | SET, ADD, SUBTRACT, etc. |
| 🔺 (Diamond) | Decision / Condition | IF / ELSE |
| ➡️ (Arrow) | Flow of control | — |
Step‑by‑Step: From English to Flowchart
- Read the description carefully. Highlight keywords: IF, THEN, ELSE, WHILE, END, etc.
- Identify the start and end points. Place an oval for BEGIN and another for END.
- Break the description into atomic actions. Each action becomes a rectangle.
- Locate decisions. Anything that checks a condition becomes a diamond.
- Connect the shapes with arrows. Show the flow from one step to the next.
- Check loops. A WHILE loop will have an arrow that goes back to the decision diamond.
- Validate. Walk through the flowchart with a sample input to ensure it matches the description.
Illustrative Example
Structured English:
BEGIN
INPUT number
IF number MOD 2 = 0 THEN
SET result = number + 2
ELSE
SET result = number - 1
END IF
OUTPUT result
END
Flowchart representation (text version):
[🟢 BEGIN] | v [🟦 INPUT number] | v [🔺 number MOD 2 = 0?] | \ | \ v v [🟦 result = number + 2] [🟦 result = number - 1]
Practice Exercise
Write a flowchart for the following structured English. Try to draw it on paper or using a diagram tool. Then compare with the solution below.
BEGIN
INPUT age
IF age < 18 THEN
OUTPUT "Underage"
ELSE IF age < 65 THEN
OUTPUT "Adult"
ELSE
OUTPUT "Senior"
END IF
END
Solution
Flowchart (text version):
[🟢 BEGIN]
|
v
[🟦 INPUT age]
|
v
[🔺 age < 18?]
| \
| \
v v
[🟦 OUTPUT "Underage"] [🔺 age < 65?]
| | \
+-----------+--------------+ \
| v
| [🟦 OUTPUT "Adult"]
Key Takeaways
- Structured English uses a fixed set of keywords that map directly to flowchart symbols.
- Start with the BEGIN/END ovals, then add rectangles for actions, diamonds for decisions, and arrows for flow.
- Loops (WHILE) are represented by a decision diamond with an arrow looping back.
- Always test your flowchart with sample data to confirm it behaves as described.
- Practice by converting short descriptions into flowcharts; the more you do, the faster you’ll spot patterns.
Further Resources
- Cambridge A‑Level CS 9618 Study Guide (Chapter 9) - Online flowchart makers: draw.io, Lucidchart - Practice problems on the Cambridge Assessment website
Revision
Log in to practice.