Problem Solving and Programming Techniques Flashcards
Sequence
Instructions happening one after the other
Iteration
A selection of code that can be repeated
Iteration: Count controlled
Code repeated a set of number times
Iteration: Condition Controlled
Code repeated based on the evaluation of a Boolean expression
Selection
Instructions that evaluate a Boolean expression and then branch code to one or more alternative path
Recursion
A function that can call itself
Global Variable
A variable that can be used anywhere in the program
Local Variable
A variable which is defined and can only be used within one part of the program
Modularity
A solution is broken down into small self-contained chunks
Functions
Code written to perform a task which returns a value
Procedures
Code written to perform a task which can take parameters
Parameters
Data structures passed into a procedure or function when called
Parameter Passing
Process of providing a procedure, function or module with values at the point when you call it
Parameter Passing: By Value
A local copy of the data is used which is discarded when the subprogram exits