Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Wikipedia. W. edwards deming, 2010. [Online; accessed 1/29/2010; http://en.wikipedia.org/wiki/William_Deming].
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2011 Springer-Verlag London Limited
About this chapter
Cite this chapter
Lee, K.D. (2011). Repetitive Tasks. In: Python Programming Fundamentals. Undergraduate Topics in Computer Science. Springer, London. https://doi.org/10.1007/978-1-84996-537-8_3
Download citation
DOI: https://doi.org/10.1007/978-1-84996-537-8_3
Publisher Name: Springer, London
Print ISBN: 978-1-84996-536-1
Online ISBN: 978-1-84996-537-8
eBook Packages: Computer ScienceComputer Science (R0)