In the previous class you learnt about IPO charts and how they are simply a set of steps that is used to arrive at an end result. Today we will be looking at Algorithm and Pseudocodes.
An algorithm is the step by step instructions required to obtain the solution to a problem. It must have a set of rules, must be explicit and have clear stopping point. It is really used to expand the 'processing' part of the IPO chart in the Pseudocode. The algorithm should start with a title and end with the key word END. IT would even better to use the word PROGRAM followed by the program name to start the Pseudocode, and end the Pseudocode with END PROGRAM.
There are some general goals in designing algorithms. A good algorithm should be:
Please research and fill in the blank
Please see videos...
After viewing the videos create an IPO Chart of one of the following:
1. Adding three numbers
2. Average temperature
A good algorithm should be :
Correct- it should accept all inputs (even invalid inputs) and output a correct answer or meaningful response or message.
2. Simple - each step of the algorithm should perform one logical step in solving the problem.
3. Clear- the algorithm should be easy to read and understand.
4. Precise - the Algorithm should present the solution steps precisely and concisely without referring to low-level (program code) details.
5. Easy to implement - the algorithm should be relatively easy to translate into a programming language.
6. Effecient- the algorithm should enable the program code to produce results quickly, depending on the problem size, and not waste any memory time.
From the IPO chart attempt to create a flow chart.