Year 8 - Computing
Iteration using while loops
Introduction to Python programming
Study Hub
This pupil-friendly study guide includes a unit summary, clear notes, common mistakes, and quick questions with answers.
Year 8 - Computing
Introduction to Python programming
This unit introduces pupils to text-based programming with Python. Pupils start with programs involving input and output, and gradually move on to using arithmetic operations, randomness, selection, and iteration. Pupils will consolidate these skills in a project at the end of the unit.
You will learn to use iteration to repeat sequences of code in a program and use a flag to stop a loop from running.
Condition controlled iteration will execute until a condition is met. While loops are used for condition controlled iteration in Python.
the process of repeating a sequence of instructions within a program loop. Add one real device or system example to prove understanding.
Mistake: A while loop is the most appropriate loop to use when you know exactly how many iterations will need to be performed. Correction: While loops should be used when the number of iterations can change. Even though while loops can be used in this way, for loops are a more appropriate choice as they will track the number of iterations as part of their operation.
Browse all guides in the Year 8 Computing guide library.