Pseudo-code, Program Code & Flowcharts Flashcards
All 14 cards in this deck
Which flowchart symbol is a rounded rectangle (oval), and what is it used for?
The terminal symbol — the Start or Stop of the algorithm.
Which flowchart symbol is a plain rectangle, and what is it used for?
The process symbol — a calculation or an assignment to a variable.
Which flowchart symbol is a diamond, and what is it used for?
The decision symbol — a condition with two labelled exits (Yes/No).
Which flowchart symbol is a parallelogram, and what is it used for?
The input/output symbol — data entered into or sent out of the algorithm.
Which flowchart symbol is a rectangle with two extra vertical lines at its sides?
The subroutine symbol — a call to a separate subroutine.
What do the lines with arrowheads in a flowchart show?
The flow of control — the order and direction in which the symbols are followed.
What are the steps to work out the output of a flowchart for a given input?
e.g. input 5 to a flowchart that doubles a number then adds 1
- Start at the Start terminal and follow the arrows: number = 5
- Carry out each symbol's instruction, taking the branch that matches at a decision: , then
- Record whatever reaches an output symbol: output 11
What are the steps to complete a missing decision in a partially drawn flowchart?
e.g. an empty diamond whose Yes branch outputs "Pass"; the pass mark is 50
- Look at what each branch out of the symbol does: Yes gives 'Pass'
- Work out the condition that must be true to take the Yes branch: score ≥ 50
- Write it inside the diamond, labelling both exits Yes and No
What are the steps to draw a flowchart for a described algorithm?
e.g. input a number and output "Big" if it is over 100
- Begin with a Start terminal and a parallelogram for each input: input number
- Add rectangles for processes and diamonds for decisions with Yes/No exits: number > 100?
- Add output symbols and a Stop terminal, joining everything with arrows: output "Big"
What are the steps to convert a flowchart decision into AQA pseudo-code?
e.g. a diamond "score > 50?" with Yes → output 'Pass', No → output 'Fail'
- Write the condition as an IF:
IF score > 50 THEN - Put the Yes branch underneath:
OUTPUT 'Pass' - Put the No branch after
ELSE, then close:ELSE OUTPUT 'Fail' ENDIF
- Write the condition as an IF:
Name three ways an algorithm can be represented.
Pseudo-code, program code and a flowchart.
What is pseudo-code?
A way of writing out an algorithm in structured, code-like statements without following the rules of any particular programming language.
On a flowchart, how does a sequence differ from selection?
A sequence follows a single path from Start to Stop with no decisions; selection has a decision diamond that splits the flow into different routes.
How does iteration appear on a flowchart?
An arrow leads back to an earlier point, usually from a decision, so a group of steps is repeated.