What is a data type?
A classification of data into groups
What is an integer?
Used to represent whole numbers, either positive or negative
What is a real?
Used to represent numbers with a fractional part, either positive or negative
What is chr?
Used to represent a single character such as a letter, digit or symbol
What is a string?
Used to represent a sequence of characters
What is boolean?
Used to represent true or false values
What is casting?
When you convert one data type to another data type
What is a programming construct?
Determines the order in which lines of code are executed
State the 3 types of programming constructs
Sequence, Branching, Iteration
What is a sequence?
What is a selection?
What is an iteration?
What is a SWITCH/CASE statement?
What is a for loop?
Count controlled loop that will repeat a fixed number of times
What is a while loop?
Condition controlled loop that will repeat until a condition is met
- Provides a flexible way to handle situations where the number of iterations in unknown in advance
What is modularity?
Where problems are broken down into more manageable pieces
- Each piece of the problem should be carried out by one single subroutine
What are subroutines?
What is a function?
Block of code that takes in 0, 1 or more parameters, performs a set task and return a value
What is a procedure?
Block of code that takes in 0, 1 or more parameters and performs a set task
What is a parameter?
Pieces of data which are passed into the function or procedure to allow it to complete a task
What are the two ways of passing a parameter?
What does it mean by parameter passing by value?
What does it mean by parameter passing by reference?
What is recursion?
When a function calls itself to solve a problem or execute a task
- Uses idea of self-reference to break down complicated problems into more manageable subproblems