HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Planning a Program: Life Cycle, Decomposition and Flowcharts
  1. 1The program development life cycle
  2. 2Decomposition, abstraction and structure diagrams
  3. 3Flowcharts
  1. Computer Science
  2. /Planning a Program: Life Cycle, Decomposition and Flowcharts
  3. /Flowcharts

Course 7.1·Lesson 3 of 3

Flowcharts

A flowchart shows the steps of an algorithm with standard shapes joined by arrows. You learn the six symbols of the syllabus, read flowcharts with decisions and loops, work out their outputs, state their purpose and draw your own.

about 25 min1 simulation1 practice question
Lesson 3 of 3Show all lessonsHide
Planning a Program: Life Cycle, Decomposition and Flowcharts
  1. 1The program development life cycle
  2. 2Decomposition, abstraction and structure diagrams
  3. 3Flowcharts

Try the code and the simulations beside the lesson.

A picture of the steps

An algorithm is a set of steps that solves a problem. A flowchart draws those steps as shapes joined by arrows. You start at START, follow the arrows, do what each shape says, and finish at STOP. Because the shapes are standard, any programmer can read your flowchart.

The six symbols

The six flowchart symbols of the syllabus, each with its name and use. Terminator, a box with round ends: Start and Stop. Process, a rectangle: something is done. Input/Output, a parallelogram: a value in or out. Decision, a diamond: Yes or No, two exits. Subroutine, a rectangle with an extra line inside each end: a call to a separate flowchart. Flow line, an arrow: control passes along it.

These are the symbols the Cambridge IGCSE syllabus uses. Use exactly these.

  • Terminator (a box with round ends): START and STOP.
  • Process (a rectangle): something is done, such as Total ← 0.
  • Input/Output (a parallelogram): INPUT Number or OUTPUT Total.
  • Decision (a diamond): a question with two exits, Yes and No (or True and False).
  • Subroutine (a rectangle with a line inside each end): a call to a separate flowchart that is not joined to this one.
  • Flow line (an arrow): control passes from one shape to the next.

Write the steps precisely. Temp > 30 is right. "Temp is greater than 30" is not accepted in the exam, because it is not precise.

A decision: selection

A flowchart. START, then the input/output shape INPUT Temp, then the decision Temp > 30?. The Yes exit goes down to OUTPUT "Hot". The No exit goes right to OUTPUT "Mild". Both outputs lead to STOP.

This flowchart inputs a temperature. The decision asks Temp > 30?. If the answer is Yes, the output is "Hot". If it is No, the output is "Mild". Only one path is followed each time. Choosing between paths like this is called selection.

Try it. For an input of 353535 the output is "Hot". For 303030 the answer to 30 > 30 is No, so the output is "Mild". A value on the edge of a decision is worth checking every time.

A loop: repeating steps

A flowchart. START, then the process Total ← 0, then INPUT Number, then the decision Number = 0?. The No exit goes right to the process Total ← Total + Number, and a flow line from there goes round and back up to INPUT Number. The Yes exit goes down to OUTPUT Total and then STOP.

In this flowchart a flow line goes back up to an earlier shape. That makes a loop: the steps inside it repeat. Follow it with the inputs 444, 777 and 000.

  1. Total ← 0.
  2. Input 444. Is it 000? No. Total becomes 444. Back to the input.
  3. Input 777. Is it 000? No. Total becomes 111111. Back to the input.
  4. Input 000. Is it 000? Yes. Output 111111. Stop.

The 000 is a signal to stop, not a number to add. A value used like this is often called a rogue value.

The purpose of the algorithm. The syllabus asks you to state what a given algorithm is for, and to describe its processes. For this flowchart: "It inputs numbers until a 000 is input, adds them up, and outputs the total." A good purpose statement says what goes in, what is worked out and what comes out.

Here is the same algorithm in pseudocode. You learn to write pseudocode in the next course.

pseudocode
Total ← 0
INPUT Number
WHILE Number <> 0 DO
    Total ← Total + Number
    INPUT Number
ENDWHILE
OUTPUT Total

Practise with new numbers

Try it in Python

The grey block marked pseudocode is written in the exam style. It does not run on the site. The box marked Python below it is the same algorithm in Python, and that one runs. The Python program follows the loop flowchart step by step. The inputs are in a list. You met while loops in the Python Foundations chapter "Loops: Repeat Until with while".

Read it first. Then run it. Does it print the same total as the dry run above?

1. Change the list to [5, 5, 5, 0]. Predict the output.

2. Change the list to [0]. How many times does the loop body run?

Common mistakes

  • A decision with one exit. Every diamond has two exits, labelled Yes and No.
  • Using a rectangle for input or output. Input and output go in a parallelogram.
  • Words instead of operators. Write Count > 10, not "Count is more than 10".
  • A loop with no way out. Make sure something inside the loop changes the value the decision tests.
  • Forgetting the edge value. Check what happens when the input equals the number in the decision.

Remember these

  • Terminator for START and STOP, rectangle for a process, parallelogram for input and output, diamond for a decision, double-sided rectangle for a subroutine, arrows for flow.
  • A decision has two exits, Yes and No.
  • A flow line back to an earlier shape makes a loop.
  • State the purpose of an algorithm by its inputs, what it works out and its outputs.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. Which flowchart shape holds OUTPUT "Hello"?
  1. In the temperature flowchart, what is output for an input of 313131?
  1. In the loop flowchart, the inputs are 666, 222, 999 and 000. What is output?
  1. A flowchart has a box with a line inside each end, labelled SortScores. What does this box mean?
  1. State the purpose of this algorithm: input a mark; if the mark is 505050 or more, output "Pass", otherwise output "Try again".

References

  • Cambridge International, IGCSE Computer Science 0478 syllabus (2026, 2027 and 2028), unit 7, parts 2 and 3, and section 4: flowchart symbols.

Enroll free in Planning a Program: Life Cycle, Decomposition and Flowcharts

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (4)

A flowchart works like this. Start. Set Big to 0 and Loops to 0…Medium · High School (9–10) · by StemPy Lab
A door lock asks for a password until the right one, Open, is typed…Hard · High School (9–10) · by StemPy Lab
A flowchart inputs two numbers, A and B…Easy · High School (9–10) · by StemPy Lab
That was the last lessonBack to the course
← Planning a Program: Life Cycle, Decomposition and Flowcharts
← Decomposition, abstraction and structure diagramsNext →

Discussion (0)

Log in to join the discussion.

Loading…

1 Python program
5 questions to check yourself

This lesson is free to read. Enroll free to keep your place in the course.

This is the kind of long scenario question that ends Paper 2…
Hard · High School (9–10) · by StemPy Lab

Python Labs (1)

From flowchart to PythonPython Lab · by StemPy Lab

Question Sets (1)

Planning Programs: Check Your Understanding10 questions · by StemPy Lab