All Flashcards
Scope of a variable
Defines which parts of an algorithm is visible
Usually the whole program or a subroutine
Cannot be accessed outside of this scope
Lifetime of a variable
How long the variable is kept in memory
How long until the memory is wiped
How long the data is retained
Constant
A variable that stores data, which is fixed. For example, Pi will not change.
Self documenting identifiers
names that should reflect the data stored in them.
Local variable
They are declared and used within limited parts of program. For instance, subroutine, function or method.
Global variable
Accessible throughout the whole program
Scope
How accessible a variable is, whether throughout the program or just without sub-routine.
Static variable
Variables stored in a location in memory and lasts the entire time the program runs
Dynamic value
A variable who’s address is determined when the program is run
Sequence
specific order in which instructions must be carried out for the algorithm to work.
Loop
Series of steps being carried out more than once.
Selection
Where a decision is made
Taking one path or the other
Some instructions will have an algorithm containing different options.
Rogue value
Values that fall outside of the range of normal data
Iteration
Single pass through a set of instructions
Most programs contain loops of instructions that are executed continuously
Computer repeatedly executes loop, iterating through the loop
Algorithm
A sequence of instructions that perform a specific task