Algorithm and Flowchart Flashcards
Algorithm
It is a written list of step-by-step instructions for solving a problem that terminates after a finite number of steps.
Flowchart
A graphic representation of the flow of code using different shapes and arrows.
Give the 6 Properties of Algorithm
- Finiteness
- Absence of Ambiguity
- Scope definition
- Sequence of Execution
- Effectiveness
- Input and Output
Finiteness
Has an exact number of steps to be taken and an end.
Absence of Ambiguity
Every instruction is precisely described and clearly specified.
Sequence of Execution
Program is executed from top to bottom.
Input and Output
The unknowns of the problem is defined and there is an expected outcome.
Effectiveness
The solution is guaranteed to give a correct answer and the specified instructions are carried out.
Scope Definition
Applies to specific problem and class.
5 steps in Program Development
- State the problem clearly
- Plan and write the logical order of instructions
- Code the program
- Enter the program into the computer
- Run and debug the program
A problem cannot be solved unless understood properly.
State the problem clearly
The computer follows exactly the given instructions
Plan and write the logical order of instructions
Write the programming statements in the desired language.
Code the program
Type the statement into the computer
Enter the program into the computer
Check if you got the desired output; correct the error if there’s any.
Run and debug the program