Programming with Python: first steps · Lesson 4 of 6

Repeating with for and while

Today you will

  • Repeat steps with a for loop and range().
  • Keep a running total inside a loop.
  • Repeat until something changes with a while loop.

Before you start: Variables, arithmetic and if, from the first three lessons.

Opening your exercise book…

Practice

Marked as you go. Get 75% right to complete the lesson.

Getting your desk ready…

Build status · Flash Infinity AI™ is a trademark of AI-Flash Inc.. WorldClass is not affiliated with, approved or accredited by any exam board, curriculum provider or university unless a page says so.