Flowchart for a WHILE loop
In a flowchart the decision comes first. Yes runs the body and an arrow returns to the decision. No leaves the loop to the next step. The body may run zero times.
Understanding Flowchart for a WHILE loop in IGCSE Computer Science Paper 2
What it does: In a WHILE flowchart the Yes exit leads into the body. The last step of the body has an arrow back to the decision. The condition is checked before the body. If it is false at the start, the flowchart takes the No path and skips the body. No means the condition is false. The flow leaves the loop and carries on with the next step in the algorithm. Putting the body first and the test after it is the shape of a REPEAT ... UNTIL loop, not a WHILE loop.
Common mistakes: In a WHILE loop the Yes path runs the body and then an arrow goes back to the decision. It must not leave the loop. The line should be 'Yes: body, arrow to decision'. A WHILE loop is drawn with the decision before the body. The body-first version is a REPEAT loop. It should be 'Decision: Num > 0?'.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 188–213) and word search (Modules 188–231).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
WHILE condition DOFill in the Blanks
Spot the Error
Student with a class code? Join your class →