9.2 Algorithms: Drawing Flowcharts from Structured English
This section provides detailed notes on how to draw flowcharts from structured English descriptions, a crucial skill for Computer Science A-Level.
Understanding Structured English
Structured English is a high-level programming language designed to be easily translated into machine code. It uses a combination of keywords and mathematical notation to represent program logic. Key features include:
Flowcharts use standardized symbols to represent different types of operations. The following are commonly used:
Symbol
Name
Start/Begin
Process/Operation
Decision
Input/Output
Connector
End/Stop
Drawing a Flowchart: A Step-by-Step Approach
Identify the Start and End points: Every flowchart begins with a start symbol and ends with an end symbol.
Break down the Structured English: Divide the structured English description into smaller, manageable steps. Each step will typically correspond to a single flowchart symbol.
Represent Processes with Rectangles: Use a rectangle to represent any operation or calculation.
Represent Decisions with Diamonds: Use a diamond to represent a decision point (e.g., IF statement). The diamond will have two or more outgoing arrows, each labeled with the possible outcomes (e.g., Yes/No).
Represent Input/Output with Parallelograms: Use a parallelogram to represent input or output operations (e.g., READ, WRITE).
Use Arrows to Show the Flow of Control: Arrows connect the symbols and indicate the order in which the steps are executed.
Use Connectors for Long Flows: For complex flowcharts, use connectors (small circles) to link different parts of the flowchart, especially when the flow crosses over. Label the connectors with a letter or number to indicate the order of connection.
Example
Consider the following structured English description:
START
READ number
IF number > 10 THEN
WRITE "Number is greater than 10"
ELSE
WRITE "Number is not greater than 10"
ENDIF
STOP
The flowchart for this description would look like this:
Suggested diagram: A flowchart illustrating the structured English example above, including start, input, decision, process (write), and end symbols with appropriate connectors.
Practice
To further solidify your understanding, practice drawing flowcharts from various structured English descriptions. Pay close attention to how decisions and loops are represented.
Common Mistakes to Avoid
Forgetting the start and end symbols.
Incorrectly representing decisions or loops.
Not using arrows to indicate the flow of control.
Creating overly complex flowcharts that are difficult to follow.