FLOW CHART
- Flowcharts can be used to represent algorithms visually, they use Diagram which use particular symbols to show the
flow of data, processing
and input/output
that takes place within a program or task.
- The image below shows that standard flowchart symbols that we use,
flow of data, processing
and input/output
that takes place within a program or task.WHEN TO USE A FLOWCHART
- To develop understanding of how a process is done
- To study a process for improvement
- To communicate to others how a process is done
- When better communication is needed between people involved with the same process
- To document a process
- When planning a project
Main Flow Chart Structurers
- Sequence structure
- Selection structure
- Reptation structure
Sequence Structure
A sequence structure is a simplest flowcharting construction.
Example :-
A program is to be developed allows to user enter two number and final output is shown to sum of these numbers.
We can write a algorithm above question like what is given below.
Algorithm
Step 1 :- Start
Step 2:- Enter 1st number (A)
Step 3 :- Enter 2nd number (B)
Step 4 :- Sum = A+B
Step 5 :- Print Sum
Step 6 :- End
We can show that code flow chart
Selection Structure
The selection control structure allows one of see of statement to be executed if a condition is true and another set of action to be executed if a condition is false.
Example :-
Think a program is to be developed allows to user enter number and check whether if user entered number is Even number print "This number is even number" otherwise print "This number is not even number". We have to write code that problem through selection method.
Algorithm
Step 1 :- Start
Step 2:- Enter 1st number (A)
Step 3 :- If A/2 %0 then
Step 4 :- print("This number is even number")
Step 5 :- else
Step 6 :- print("This number is not even number")
Step 7 :- End