N4
- graphical to illustrate selection and iteration
- other contemporary design notations
N5
- pseudocode to exemplify programming constructs other contemporary design notations
You read a flow chart from the START block and follow the arrows (normally downward). In the example above you can see selection taking place in the first diamond, while the second diamond allows for iteration (repetition) to take place.
A structure diagram shows how the program is structured and in some cases how data can be passed from one part to the other.
Pseudocode
Pseudocode is an informal text description of the working of a program it is written using English words but not in a sentence structure. There are no syntax rules due to its informal nature, sometime they are numbered and sometimes they are not.
The SQA can sometimes refer to pseudocode in the exam when describing a program. However, they are often referring to Standard Reference Language. Rule of thumb, if they are asking you to read pseudocode it will be SRL, if they are asking you to write psuedocode then they mean psuedocode. Hopefully they will start using the correct terms in future papers.
Example 1
- set total = 0
- set count =0
- while count less than 10
- get nextInput from user
- add nextInput to total
- add one to count
- end while
- display total/10
Example 2
get age from user while age < 0 or age >130 display error get age from user display age