Describe the term Algorithm
A sequence of instructions or a set of rules that are followed to complete a task
A sequence of unambiguous instructions
A well defined procedure that allows a computer to solve a problem
A set of mechanical or sequential steps that are followed in order to take some form of input
Methods of Defining an Algorithm?
Pseudocode
Flowcharts
Structured English
What is a variable?
A named location in the Computer's memory that the programmer can use to store data whilst the program is running.
They can change throughout the life of the program.
What is a Constant?
Similar to variables in the fact they can be used for storage of data but once we run the program a constants value can not change
Example: pi = 3.1415
What is a Recursive Function?
It's a function that calls itself within itself until a base case is reached
What are the limitations of using a recursive function?
You can run out of memory (stack space) due to high no. of recursive calls
Difficult to debug (dry run) if it produces incorrect results due to the difficulty of determining which recursive cell made the error
What’s a Factorial ?
It's any give number that can be calculated by multiplying the numbers below it
example :
Factorial of 6 or 6!
= 6x5x4x3x2x1 == 720
What’s the difference between Validation & Verification checks
Validation checks occurs before data is committed to storage it doesn't account for the accuracy of data
Verification occurs after data is committed to storage