Pseudocode FOR ... TO ... NEXT loop
A count-controlled loop that repeats the indented statements a fixed number of times, with Count going from 1 to 10. NEXT Count closes the loop and moves Count up by 1.
Understanding Pseudocode FOR ... TO ... NEXT loop in IGCSE Computer Science Paper 2
What it does: The OUTPUT statement is indented inside the loop, so it repeats 3 times, showing 1, 2 and 3. NEXT Count closes the loop. Counting from 1 to 10 gives 10 repeats. The variable after NEXT (Number) matches the one in the FOR line. A FOR loop uses TO to give the end value. UNTIL belongs to REPEAT ... UNTIL, not FOR. Count takes the values 1, 2, 3 ... 10, and both the start and end values are included. That makes 10 repetitions. A FOR loop counts upwards from the start value to the end value. The start value must be the smaller one.
Common mistakes: NEXT must use the same variable as the FOR line. The loop counter is Count, so the line should be NEXT Count. A FOR loop uses the keyword TO between the start and end values. UNTIL belongs to REPEAT ... UNTIL. It should be FOR Count ← 1 TO 10.
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 123–134) and word search (Modules 123–145).
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
FOR Count ← 1 TO 10Fill in the Blanks
Spot the Error
Student with a class code? Join your class →