Single lesson · Written for AQA GCSE Computer Science (8525)

Definite iteration: FOR loops – AQA GCSE Computer Science lesson (8525)

Pupils learn to write definite iteration with FOR loops in the class's language and AQA pseudo-code, including STEP.

Also in a bundle Binary, Logic and Iteration – AQA GCSE Computer Science lessons (8525) 13 lessons for £39 · save 25% on buying separately

Lesson 2 of 13 in unit 10.3 Binary, Logic and Iteration, taught in Year 10, Spring 1. It answers one big question: How can a program repeat steps a set number of times?

By the end, pupils can write definite iteration with FOR loops in the class's language and AQA pseudo-code, including STEP.

The Build (the main task)
Write a program that uses a FOR loop to output the day number and the temperature setting for each of the 7 days. (4 marks) Write the same loop in AQA pseudo-code. (2 marks)
Support version
Part-filled code with the loop line given; pupils write the body.
Challenge
The hub cools a room down in the evening. Write a loop that outputs 24, 22, 20 and 18: first in the class's language, then in AQA pseudo-code. (4 marks) Complete the trace table for this algorithm. (4 marks) Write a program that inputs how many temperature sensors there are, then uses a FOR loop to input each sensor's reading (a whole number) and outputs the total of the readings once, after the loop. (6 marks)
Real-world link
The smart home hub sets the heating for each day of the week.
Key words
Iteration, Definite iteration and Repeat, each with a definition, an icon and a common mix-up on the key vocabulary slide.
Misconceptions it tackles
“FOR i ← 1 TO 5 runs four times”; “The loop counter can be used after the loop has finished”.
AQA 8525 specification
3.2.2 (programming concepts: definite, indefinite and nested iteration).

Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.

Pupils need computers for the main task.

Also sold in the Binary, Logic and Iteration unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.

Choose your school's Paper 1 language when you buy: C#, Python or VB.NET. You get that language's files: every program, code example, worked answer and programming task is written in it, and lessons with no code are the same in all three. Algorithms are also shown in AQA pseudo-code, as in the exam.

An independent resource written for AQA GCSE Computer Science (8525). It is not endorsed by AQA.

What's included

  • Slide deck (PowerPoint)
  • Lesson plan (Word)
  • Worksheet (Word)
  • Support worksheet with scaffolds (Word)
  • Single-teacher licence: use and adapt it with your own classes
  • Your choice of Paper 1 language: C#, Python or VB.NET

More for GCSE Computer Science (AQA)

See all

Written for the specifications named. Not endorsed by or affiliated with any exam board.