Section 7.1 Iteration 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. In this chapter we are going to look at two common forms of iteration: the
while
statement and the for
statement.You have attempted of activities on this page.