Head office, Rana Pratap Bagh, Delhi011 2721 1512+91 97116 99511

Flowcharts: drawing a plan

Draw a flowchart with start, step, decision and end shapes, follow the arrows, and plan any task before writing code.

Get the whole book: Computers and coding for classes 6 to 8 (8 lessons, free to print)

Let us begin

The big idea

Before a programmer writes code, they often draw the plan as a picture. That picture is called a flowchart. You can draw one with just paper and a pencil, and it works for recipes, games and sums too.

A flowchart uses a few simple shapes joined by arrows. A rounded box (oval) marks Start and End. A rectangle is a step: something to do, like "add 5" or "boil the water". A parallelogram is used for input or output, like "ask for a number" or "print the answer".

A diamond is a decision. It asks a yes or no question, such as "is the number bigger than 10?". Two arrows leave a diamond: one labelled Yes and one labelled No. Every other shape has exactly one arrow leaving it.

To follow a flowchart, put your finger on Start and move along the arrows. At each diamond, answer the question and take the matching arrow. You stop when you reach End. If an arrow goes back up to an earlier box, that is a loop: the same steps repeat until the decision says to stop.

A good flowchart has one Start, at least one End, arrows that all point somewhere, and short clear words in every box. If you get lost while following it, the chart needs fixing before anyone writes code from it.

Flowchart for checking whether a number is evenAn oval labelled Start at the top leads to a parallelogram labelled input N, then to a diamond asking whether N divided by 2 leaves remainder 0. The Yes arrow goes to a box printing even, the No arrow to a box printing odd. Both lead to an End oval. Start Input a number N N divided by 2 remainder 0? Yes Print "even" No Print "odd" End Oval = start / end Rectangle = step Diamond = decision Slanted box = input / output
The four flowchart shapes: oval for start and end, parallelogram for input and output, rectangle for a step, diamond for a decision.

Worked examples

See how it works

  1. Crossing the road

    Start. Step: stand at the kerb and look right, left, right. Decision: is the road clear? If No, go back to the look step. If Yes, step: walk straight across. End. The No arrow makes a loop: you keep looking until it is safe.

  2. Is the number even?

    Start. Input: take a number N. Decision: does N divided by 2 leave remainder 0? If Yes, output "even". If No, output "odd". End. Try N = 14: 14 divided by 2 is 7 remainder 0, so the Yes arrow is taken and the output is "even".

  3. Counting to 5

    Start. Step: set count to 1. Output: print count. Decision: is count equal to 5? If No, step: add 1 to count, then go back to the print box. If Yes, End. Following it prints 1, 2, 3, 4, 5 and then stops.

Try it at home

Flowchart your morning

You will need

  • Two or three sheets of paper
  • A pencil and an eraser
  • A coin or a small stone to use as a marker

What to do

  1. List the first six things you do after waking up, for example brush teeth, bathe, eat breakfast, pack bag.
  2. Draw an oval for Start, then a rectangle for each thing, joined by arrows going down.
  3. Add one diamond with a question, such as "is it raining?", and give it a Yes arrow (take an umbrella) and a No arrow (go straight to the bag).
  4. Finish with an End oval. Now place the coin on Start and move it along the arrows, saying each step aloud.
  5. Ask a family member to follow your chart with the coin. If they get stuck, fix the chart.

Practice sheet

Check what you learned

Write your answers in a notebook, or print this sheet and write on it. When you finish, mark your work with the answer key.

Practice sheet: Flowcharts: drawing a plan (Classes 6-8, Computers and coding)

  1. Which flowchart shape is used for Start and End?
  2. Which shape asks a yes or no question?
  3. How many arrows leave a decision diamond?
  4. In the "is the number even?" flowchart, which arrow is taken for N = 9?
  5. What does it mean when an arrow goes back up to an earlier box?
  6. Which shape would you use for "print the total"?
  7. In the counting flowchart, what is printed if the decision is "is count equal to 3?" instead of 5?
  8. Name one thing that is wrong if a flowchart has no End shape.
  9. Draw in words a two-step flowchart for making tea with one decision in it.
  10. Why is it useful to draw a flowchart before writing a program?

Answer key

Answers: Flowcharts: drawing a plan

Do the practice sheet first, then check here. If an answer is different from yours, read the lesson again and try once more.

  1. A rounded box (oval).
  2. The diamond.
  3. Two: one for Yes and one for No.
  4. The No arrow, because 9 divided by 2 leaves remainder 1, so the output is "odd".
  5. It is a loop: the earlier steps repeat until the decision sends you another way.
  6. A parallelogram (slanted box), because printing is output.
  7. 1, 2, 3 and then it stops.
  8. Anyone following it can never finish; every path must reach an End.
  9. Start, boil water, add tea leaves, decision: do you want milk? Yes: add milk, No: skip, pour, End. (Any sensible answer with a diamond is correct.)
  10. You can see mistakes and missing steps early, and others can understand the plan before any code is written.
WhatsApp us