1.3 - Algorithms Flashcards
What are the two ways algorithms can be defined?
- Flow Charts
- Pseudo Code
- Structured English (Additional)
What shape is the start/stop symbol?
- Rounded off rectangle
What is represented by a rectangle?
- A process
What shape is a decision represented by?
- A diamond
What is represented by a parallelogram?
- Input/output
What shape is a connector (jump from one point in the sequence to another) represented by?
- A circle
What do the arrows represent?
- The direction of flow
What is the use of a variable?
A variable is a named area of memory used to store data that may change when the program is running
What is the use of a constant?
A constant is a named area of memory used to store data which will not change
When are values passed by value?
This is where only the value of the data is passed and therefore it cannot be accidentally changed by the procedure
When are values passes by reference?
This is where the memory address of the data is passed and therefore the procedure can update the its value
What is the difference between a local and global variable?
Global variables can be changed anywhere in the program whereas local variables be used in the procedure where it is declared
What is a parameter?
A parameter is a variable / value that can be passed to / from the procedure
What is the difference between validation and verification?
- Validation checks if the data seems right
- Verification checks if the data is accurate
What two features of does a recursive algorithm need?
- To call itself
- Needs a base case