SHSubjectHub

Repeating Things: Loops

KS3Lesson packSubscription
Also online

This worksheet marks itself

Set it as homework or classwork and every answer is marked as pupils go, with feedback on what they got wrong. The scores go straight into your mark book, so you can see who needs help before the next lesson.

  • 6 questions
  • 15 marks
  • about 25 minutes
  • marked instantly

Question types: multiple choice, true or false, matching, short answer, fill the gap.

Try one from this worksheet

A for loop repeats once for each number range() produces. The stop number is never included. Which numbers does range(2, 7) produce?

Pick an answer: it's marked straight away, just as your pupils would see it.

About this resource

KS3 Computing — Python, Lesson 5 of 6. for loops with range(), while loops, loop counters and accumulators, choosing for vs while, and the danger of infinite loops. Students write and run real Python in the built-in interpreter to build a times-table printer, a countdown, and a limited-attempts p…

14 slides.

Lesson outline

  1. Do Now — Retrieval
  2. for Loops with range()
  3. Quick Check — What Does range() Give?
  4. We Do — A Countdown with for
  5. while Loops & Counters
  6. Hinge Check — Why Won't This Stop?
  7. for vs while — and the Danger of Infinite Loops
  8. Main Task — Times-Table Printer
  9. Predict the Output
  10. Challenge — Password Attempts (limited tries)
  11. for or while?
  12. Plenary — What We Learned
Unit bundlePython
Part of: Python: the whole unitEvery resource in the unit in one zip.

More from Python