← 3.4 Control Structures

for loops and range: a known number of times

Computer Studies · Grade 10 · about 40 minutes

for walks through a collection. range(1, 6) is 1 to 5. Use for when you know the count or have a list of names.

Sign in to read this lesson

Lessons are for learners and teachers with an account. Browsing the curriculum — subjects, strands and what each sub-strand covers — stays open to everyone.

  • 9 sections of explanation, worked examples and diagrams
  • 1 practice task with hints and worked answers
  • A quiz that marks itself as you go
  • Your progress kept across every subject you take
Sign in Create an account