Draw a flowchart from a structured English description

Published by Patrick Mutisya · 14 days ago

Cambridge A-Level Computer Science 9618 – Algorithms: Flowchart from Structured English

9.2 Algorithms – Drawing a Flowchart from Structured English

Learning Objective

Students will be able to translate a structured English description of an algorithm into a correct flowchart using standard flowchart symbols.

What is Structured English?

Structured English is a pseudo‑code technique that combines natural language with programming constructs. It is:

  • Clear and readable for humans.
  • Unambiguous because it uses a limited set of keywords such as IF, THEN, ELSE, FOR EACH, WHILE, REPEAT, END IF, etc.
  • Designed to be a stepping‑stone to actual code or a flowchart.

Standard Flowchart Symbols

SymbolNamePurpose
ProcessRepresents a computation or assignment.
DecisionRepresents a Boolean test (yes/no).
▶︎Start/EndMarks the entry and exit points.
Input/OutputShows data entering or leaving the system.
ConnectorIndicates continuation on another page or joins multiple arrows.

Step‑by‑Step Conversion Process

  1. Identify the start and end points. Look for phrases such as “Begin” or “When the program finishes”.
  2. Locate input and output actions. Words like “Read”, “Enter”, “Display”, “Print”. Place them in an Input/Output symbol.
  3. Find processing statements. Assignments, calculations, or calls to sub‑routines become Process symbols.
  4. Detect decision points. Any IF … THEN … ELSE … END IF or loop condition (WHILE … DO … END WHILE) becomes a Decision symbol.
  5. Determine loop structures. Convert WHILE, REPEAT … UNTIL, or FOR EACH into a Decision that feeds back to the start of the loop body.
  6. Connect the symbols with arrows. Follow the logical flow of the structured English, ensuring every decision has two outgoing arrows (Yes/No).
  7. Validate the flowchart. Check that every symbol is reachable, there is exactly one start and one end, and that the arrows correctly represent the algorithm’s logic.

Worked Example

Below is a simple structured English description for finding the maximum of three numbers.

BEGIN

READ number1, number2, number3

SET max TO number1

IF number2 > max THEN

 SET max TO number2

END IF

IF number3 > max THEN

 SET max TO number3

END IF

DISPLAY max

END

Translating to a Flowchart

  1. Start symbol.
  2. Input symbol for “READ number1, number2, number3”.
  3. Process symbol for “SET max TO number1”.
  4. Decision symbol for “number2 > max”.

    • Yes branch → Process “SET max TO number2”.
    • No branch → Skip.

  5. Decision symbol for “number3 > max”.

    • Yes branch → Process “SET max TO number3”.
    • No branch → Skip.

  6. Output symbol for “DISPLAY max”.
  7. End symbol.

Suggested diagram: Flowchart representing the “Maximum of three numbers” algorithm, using the symbols listed above.

Common Pitfalls and How to Avoid Them

  • Missing arrows. Every symbol must have at least one incoming and one outgoing arrow (except Start/End).
  • Incorrect decision branching. Always label the two branches (e.g., “Yes” and “No”) and ensure they lead to the correct subsequent symbols.
  • Over‑complicating the diagram. Keep the flowchart as simple as possible; combine sequential processes into a single Process symbol when appropriate.
  • Loop direction errors. The arrow from the decision back to the start of the loop body must be clearly indicated.

Practice Exercise

Convert the following structured English into a flowchart.

BEGIN

READ n

SET factorial TO 1

WHILE n > 1 DO

 SET factorial TO factorial * n

 SET n TO n - 1

END WHILE

DISPLAY factorial

END

Use the steps outlined above and refer to the symbol table. When you have completed the flowchart, compare it with the suggested diagram below.

Suggested diagram: Flowchart for computing the factorial of a positive integer using a WHILE loop.

Summary

Translating structured English into a flowchart reinforces logical thinking and provides a visual representation of an algorithm. Mastery of the standard symbols and the systematic conversion steps equips students to tackle more complex algorithms in later topics.