A-Level Computer Science / Unit 9: Computational Thinking and Algorithm Design

9.2.2 Structured English, Flowcharts and Pseudocode

πŸ”’ Lesson slides are available to signed-in users. Sign in

9.2.2 Structured English, Flowcharts and Pseudocode

The same algorithm can be communicated in several forms. This section develops the skill of documenting a solution using structured English, pseudocode or a flowchart, and of translating accurately between those representations without changing the algorithm itself.

By the end of this section, you should be able to:

  • Explain the purpose and main features of structured English, pseudocode and flowcharts.
  • Recognise and use the standard flowchart symbols for start/end, input/output, processing and decisions.
  • Document a simple algorithm in any of the three representations.
  • Write pseudocode from a structured English description.
  • Write pseudocode by following a flowchart.
  • Draw a flowchart from structured English or pseudocode.
  • Check that two representations describe exactly the same inputs, operations, decisions and outputs.
This page focuses on representation and translation. The detailed design of sequence, selection, iteration and logic conditions is developed in 9.2.3.

Three Ways to Document One Algorithm

A representation is a way of communicating the logic of a solution. Changing the representation should not change what the algorithm does.

Representation How it communicates the solution Main strength Possible limitation
Structured English Short command-style statements written in controlled natural language. Easy to draft and discuss before formal notation is needed. Can become ambiguous when commands or conditions are too informal.
Pseudocode Programming-style keywords, identifiers and indentation without using one specific language. Shows enough detail to support implementation and tracing. Must still follow consistent conventions to remain clear.
Flowchart Connected symbols show actions, decisions and the direction of control flow. Makes routes, branches and loops visible. Large algorithms can produce diagrams that are difficult to fit on one page.
Exam tip: Treat these as three views of the same logic. During a conversion, preserve every input, calculation, condition, branch, repetition and output.

Structured English

Structured English uses a restricted form of everyday language. Each line should state a clear action, test or repetition rule. It is more precise than a paragraph, but less formal than pseudocode.

Structured English: a controlled set of command-style statements used to describe the actions and control flow of an algorithm.
Effective featureExampleWhy it helps
One action per lineREAD the number of repair minutesThe order of operations is visible.
Command verbsCALCULATE the labour chargeThe required operation is explicit.
Named valuesSTORE the result as AmountDueLater steps can refer to the same value.
Clear conditionsIF the customer is a memberThe alternative route has a definite trigger.
Visible block endingsEND IFThe scope of the condition is unambiguous.
Common mistake: Narrative prose such as β€œthe system then works out what to do” is not structured English. Replace vague language with actions that another person could follow directly.

Pseudocode

Pseudocode describes an algorithm using recognised programming ideas while remaining independent of Python, Java, C++ or any other implementation language. Keywords and indentation expose the structure of the solution.

Pseudocode: a language-independent notation that uses programming-style statements to express an algorithm precisely.
INPUT RepairMinutes
LabourCharge ← RepairMinutes * 0.52
OUTPUT LabourCharge

Useful habits include:

  • using meaningful identifiers rather than unexplained single letters;
  • using the assignment symbol ← when a value is stored or updated;
  • indenting statements inside a decision or loop;
  • using matching endings such as ENDIF, ENDWHILE or NEXT;
  • following the pseudocode conventions required by the course.
Common misconception: Pseudocode is not informal program code. Avoid language-specific features unless they are part of the pseudocode conventions you have been asked to use.

Flowcharts and Their Symbols

A flowchart represents control flow visually. Arrows connect symbols in the order they are followed. Decision branches should be labelled so the reader knows which route represents each outcome.

SymbolPurposeTypical content
Start / End Terminal Marks where the algorithm begins or finishes.
Input / Output Input/output Reads data or produces a result or message.
Process Process Calculation, assignment or other action.
Condition? Decision A Boolean condition with labelled outcomes such as Yes/No or True/False.
Flow line Shows which symbol is followed next.
Exam tip: Put the condition itself inside the diamond and label the outgoing arrows. A decision with two unlabelled routes forces the reader to guess.

Different Appearance, Equivalent Meaning

A correct conversion preserves behaviour. The exact words and visual layout may change, but the same data must enter, the same operations must occur under the same conditions, and the same results must be produced.

CheckQuestion to ask after translating
InputsDoes the new representation read every value required by the original?
OrderDo dependent operations still occur in the correct sequence?
ProcessingAre calculations and assignments unchanged?
DecisionsAre the same conditions tested, with the same actions on each branch?
RepetitionDo repeated steps begin, continue and stop under the same rule?
OutputsDoes the new version produce every required result?
Common mistake: A neat flowchart is still incorrect if it adds a decision, removes an output or reverses the meaning of a branch.

Worked Example: Community Repair Workshop Charge

A workshop charges 0.52 currency units per repair minute. Registered members receive a 12% reduction. The algorithm must input the repair time and membership status, then output the amount due.

1. Structured English

READ the repair time in minutes
READ whether the customer is a registered member
CALCULATE the labour charge at 0.52 per minute
IF the customer is a registered member
    REDUCE the labour charge by 12 percent
END IF
DISPLAY the final amount due

2. Pseudocode

INPUT RepairMinutes
INPUT IsMember
AmountDue ← RepairMinutes * 0.52
IF IsMember = TRUE THEN
    AmountDue ← AmountDue * 0.88
ENDIF
OUTPUT AmountDue

3. Flowchart

In the diagram, the No branch bypasses the discount. Both branches then rejoin before the final output.
Flowchart for the repair workshop charge The flowchart inputs repair minutes and membership status, calculates a charge, applies a member discount when appropriate and outputs the amount due. Start INPUT RepairMinutes INPUT IsMember AmountDue ← RepairMinutes Γ— 0.52 IsMember = TRUE? Yes AmountDue ← AmountDue Γ— 0.88 No OUTPUT AmountDue End
Exam tip: When translating a decision, first identify the condition and then identify exactly which statements belong to each outcome. This prevents branches from being swapped.

A Reliable Method for Converting Algorithms

Structured English β†’ Pseudocode

  1. Underline the command in each line: input, calculate, compare, repeat or output.
  2. Replace descriptive data phrases with the agreed identifiers.
  3. Choose the corresponding pseudocode keyword or assignment statement.
  4. Indent statements controlled by a condition or loop.
  5. Add the closing keyword required by the construct.
  6. Trace the result against the original description.

Pseudocode β†’ Flowchart

  1. Create one start terminal and one appropriate end terminal.
  2. Convert each input/output statement to an input/output symbol.
  3. Convert calculations and assignments to process rectangles.
  4. Convert each tested condition to a decision diamond.
  5. Label the branches and reconnect them at the correct point.
  6. Use arrows to show the exact order, including any route that returns for repetition.

Flowchart β†’ Pseudocode

  1. Begin at the start symbol and follow the arrows rather than reading by page position.
  2. Write the pseudocode statement represented by each symbol.
  3. At a decision, identify both labelled outcomes before writing the block.
  4. Recognise a loop when an arrow returns to an earlier test or process.
  5. Use indentation to reconstruct the block structure.
  6. Check that every route reaches the correct next statement or end point.
Translation principle: convert the meaning of each step, not merely the words printed inside a box or line of text.

Interactive: Representation Translator

Select an algorithm pattern, then move through the correspondences. The highlighted statement and flowchart node show how the same logical step appears in all three representations.

Structured English

READ the planter length
READ the planter width
CALCULATE the area
DISPLAY the area

Pseudocode

INPUT Length
INPUT Width
Area ← Length * Width
OUTPUT Area

Flowchart

Sequence

The representations contain the same four steps in the same order.

Correspondence 1 of 4

Common Mistakes and Misconceptions

  • Copying the words but changing the logic, for example reversing the Yes and No branches.
  • Using a process rectangle for input or output instead of the input/output symbol.
  • Putting an action rather than a Boolean condition inside a decision diamond.
  • Leaving decision branches unlabelled.
  • Reading a flowchart from top to bottom while ignoring its arrows.
  • Writing pseudocode as exact Python, Java or C++ syntax.
  • Removing an apparently unimportant step that is required by another step later.
  • Adding extra processing that was not present in the original algorithm.

Practice

Try these original questions

  1. Convert the following structured English into pseudocode:
    READ the number of reusable cups
    CALCULATE the deposit as 1.25 for each cup
    DISPLAY the deposit
  2. Draw a flowchart for this pseudocode:
    INPUT BatteryLevel
    IF BatteryLevel < 25 THEN
        OUTPUT "Recharge soon"
    ELSE
        OUTPUT "Battery ready"
    ENDIF
  3. Write pseudocode for a flowchart that repeatedly inputs SoundLevel until the value is at most 55, then outputs "Safe level".
  4. Explain two differences between structured English and pseudocode.
  5. Explain why two correct representations may look different while still describing the same algorithm.
  6. A flowchart decision asks Temperature > 28?. The Yes branch starts a fan and the No branch leaves the fan off. Write an equivalent structured English description.
  7. A student converts a pseudocode algorithm to a flowchart but omits one output statement. Explain why the two representations are not equivalent.

Review

QuestionStrong answer should include
What is structured English?Controlled, command-style natural language used to document algorithm steps.
What is pseudocode?A precise, language-independent, programming-style representation of an algorithm.
What does a flowchart show?The order of actions and the routes taken through decisions and repetition.
How is input/output represented?With an input/output statement in text or a parallelogram in a flowchart.
How is a condition represented?With a conditional statement in text or a labelled decision diamond in a flowchart.
What makes two representations equivalent?The same inputs, operations, conditions, routes, repetition rules and outputs.
Final exam tip: After any conversion, trace at least two routes where possible. This is especially useful when an algorithm contains a decision or a loop.