For loops#

Learning Objectives#

After working through this topic, you should be able to:

  • Explain what a for loop is and list examples where it can be useful

  • Write for loops that iterate over:

    • Elements in lists and tuples

    • Keys, values or keys and values in a dictionary

  • Write for loops applying a manipulation to all elements in a container

  • Use for loops to sum up numbers in a list

Materials#

Here is the screencast and these are the slides.

Additional Materials#

Quiz#