Skip to main content

Part of the book series: Undergraduate Topics in Computer Science ((UTICS))

  • 18k Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Wikipedia. W. edwards deming, 2010. [Online; accessed 1/29/2010; http://en.wikipedia.org/wiki/William_Deming].

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kent D. Lee .

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics