Repetitive Tasks

  • Kent D. LeeEmail author
Part of the Undergraduate Topics in Computer Science book series (UTICS)


This chapter introduces the reader to iteration including the “for” loop and the “while” loop. Computers are very good at doing repetitive tasks, often called iteration in Computer Science lingo. Chapter three shows the reader how to iterate over sequences in Python like strings, lists, and files. In addition, the guess and check pattern is presented again in this chapter in a format that can be used to guess and check assumptions about all elements of a sequence.

Mutability of data and the accumulator pattern are important ideas that are described in this chapter along with examples and practice problems that help the reader understand and apply these concepts.


String Operator Space Character Range Function String Class Practice Problem 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 15.
    Wikipedia. W. edwards deming, 2010. [Online; accessed 1/29/2010;].

Copyright information

© Springer-Verlag London Limited 2011

Authors and Affiliations

  1. 1.Dept. Computer ScienceLuther CollegeDecorahUSA

Personalised recommendations