IPO chart
- IPO chart is graphical representation of the input, processing and output steps of a problem. It is the second step in computer-based problem solving (i.e. Analyse the problem).
- Scenario1. One is ask to create a program to calculate area.
- Now look a simple problem!!! Creating psuedocode can be made easier by writing an IPO chart as followed.
| 
Input | 
Processing | 
Output | 
| 
Length 
Width | 
Accept two numbers store in length and width | 
Area | 
| 
Multiply length by width and store in area | ||
| 
Display area | 
- As showing above columns as filled with the appropriate information.
Psuedocode
- Pseudocode is a algorithm using instructions with words and symbols that closely resemble computer programming language instructions. The word pseudo means fake. The word pseudocode mean fake-code. Psuedocode are used without following the rigid rules of a computer programming language (Pascal).
- Pseudocode Terminology
- The general programming language terms used in psuedocode are:
- Terms used for input step: Input, Read
- Terms used for output step: Output, Write, Display
- Terms used for the assignment step: Set, Store
- Terms used for selection: If-Else-Endif
- Terms used for bounded iteration: For-Endfor
- Terms used for unbounded iteration: While-Endwhile, Repeat-Until
 
- Using the IPO chart above we can easily create a pseudocode as shown below.
- 
- Step1: Start
- Step2: Input length
- Step3: Input width
- Step4: Area ← length*width
- Step5: Output Area
- Step6: Stop
 
Flowchart
- A diagrammatic representation of an algorithm using a variety of symbols. These symbols are:
 

 
No comments:
Post a Comment