GoalName the four flowchart shapes, say what each one does, and draw a small flowchart.
New words
flowchart · a drawing of an algorithm with shapes and arrowsoval · the shape that marks the start and the endparallelogram · the shape for input and outputdiamond · the shape for a decision with a yes and a no way out
Explanation
A flowchart draws an algorithm so that we can see it at a glance. It uses four shapes. The oval shows the start and the end. The rectangle shows a process, such as a calculation. The parallelogram shows input or output: reading a value or showing a message. The diamond shows a decision, a question with a yes way and a no way. Arrows join the shapes and show the direction. The rules are simple: one start, at least one end, arrows that always point in a clear direction, and every diamond has a yes arrow and a no arrow. Flowcharts are useful before coding because a mistake is easy to see on a drawing and cheap to change.
Shape
Its job
Example text inside
oval
start or end
Start
rectangle
a process
total = a + b
parallelogram
input or output
read a, b
diamond
a decision
num > 0 ?
Worked examples
This flowchart adds two numbers. Start, read a and b (parallelogram), calculate total (rectangle), show total (parallelogram), end. It has no diamond because nothing is decided.
This flowchart reads a temperature and decides. The diamond asks whether temp > 30. The yes arrow leads to Hot and the no arrow leads to Not hot. Both ways meet again at the end.
Class activity
Draw a flowchart on paper for this algorithm: read a mark; if the mark is at least 50 show Pass, otherwise show Fail. Name each shape you use. Check that the diamond has two labelled arrows.