Algorithm
A series of steps to solve a specific problems.
3 methods of defining algorithms
2 advantages of flowcharts
2 disadvantages of flowcharts
3 advantages of pseudocode
2 disadvantages of pseudocode
structured English
A cross between pseudocode and plain English.
Advantage of structured English
Easy for non-programmers to write.
2 disadvantages of structured English.
variable
A named space in the memory for a single piece of data.
constant
A variable except the data can not be changed in the program.
two scopes of a variable
Global variable (2)
Available throughout the program
Can be read /written from any subroutine.
2 advantages of local variable
Variable data is only significant in the subroutine is it being used.
Encourages the use of modular programming
local variable
Only exists until the subroutine in which it was created.
2 advantages of global variable
2 disadvantages of global variable
parameter
An item of data passed from one subroutine to another.
3 techniques to make code readable
two ways of passing a parameter
passing by value (2)
The value is passed from one subroutine to another.
If value is changed by the subroutine, the original value is unchanged.