..  Copyright (C)  Brad Miller, David Ranum, Jeffrey Elkner, Peter Wentworth, Allen B. Downey, Chris
    Meyers, and Dario Mitchell.  Permission is granted to copy, distribute
    and/or modify this document under the terms of the GNU Free Documentation
    License, Version 1.3 or any later version published by the Free Software
    Foundation; with Invariant Sections being Forward, Prefaces, and
    Contributor List, no Front-Cover Texts, and no Back-Cover Texts.  A copy of
    the license is included in the section entitled "GNU Free Documentation
    License".

.. qnum::
   :prefix: moreiter-1-
   :start: 1

.. index:: for loop
    iteration, assignment, assignment statement, reassignment
    single: statement; assignment

Introduction
============

Computers are often used to automate repetitive tasks. Repeating identical or similar tasks without making 
errors is something that computers do well and people do poorly.

Repeated execution of a sequence of statements is called **iteration**. Because iteration is so common, Python 
provides several language features to make it easier. We've already seen the ``for`` statement in a previous chapter. 
This is a very common form of iteration in Python. In this chapter we are going to look at the ``while`` statement --- 
another way to have your program do iteration.


Learning Goals
--------------

* To understand indefinite iteration
* To solve problems involving convergence

Objectives
----------

* To apply the while loop for indefinite iteration
* To be able to identify while loops that are likely to be infinite loops