Flowcharting An Introduction
Definition A flowchart is a schematic representation of an algorithm or a process.
Parts of a Flowchart Start/end process input decision arrows display delay
Start/End Shape is a rounded rectangle Start is required of all flow charts Some flow charts may not have an END
Process Shape is rectangular Process involves the action or the “verb” part of the flowchart
Input/Output Shape is a parallelogram Indicates where manual operation is needed
Decision Shape is a rhombus Outcome is either yes or no
Delay Used to indicate a pause in the program
Arrows Indicate the flow of the chart Drawn from the output of one block to the input of another Only one arrow can represent outputs Multiple arrows may represent inputs
Example Count from 1 to 10 by the odd numbers. Before attempting to draw, determine what you want the output to be. What is the first block (always)?
Step 1 The output will be 1, 3, 5, 7, 9. The Start block is always first. START
Step 2 One option is to input the number. START INPUT 1
Step 4 Now that we have the number, we need to demonstrate it. START INPUT 1 SAY NUMBER
Step 3 We have 1. How do we get the next number? START INPUT 1 ADD 2 SAY NUMBER
Step 4 We don’t want to keep adding 2. When do we stop? Is number >10? START INPUT 1 ADD 2 SAY NUMBER
Step 5 The decision block has two directions, yes or no. Where do they go? END NO YES Is number >10? START INPUT 1 ADD 2 SAY NUMBER
Your Turn Create a flow chart that shows how to pour a glass of milk.