CS110: Spring 2020

Intro to Computer Programming with Python

CS110: Spring 2020

Loops 1: While Loops

In this lesson, we’re going to go over while loops – a way of allowing your program to repeat code for a specified number of iterations. Being able to repeat code blocks (also know as “looping” or “iterating”) is very powerful, and will allow you to easily perform repetitive tasks in a variety of different contexts: playing songs, drawing pictures, building animations, doing data processing, and so forth. I also highly recommend that you read Chapter 5 in the Severance (Python for Everyone), for additional review.

Please Complete the Following Tasks

1. Download the Exercise Files

Exercise Files

2. Review the Slides

  1. Repeating Tasks with Code: While Loops
  2. Supplementary Slides for Live Lecture

3. Watch the Lecture Video(s)

Link Title Type Duration
Video 1 Introduction to loops pre-recorded 9:35
Video 2 While loops practice pre-recorded 12:22
Video 3 Loops & lLists pre-recorded 11:37
Video 4 Challenge problem pre-recorded 15:26
Video 5 More practice with while loops lecture 1:24:10

4. Review / Study the Supplemental Materials

Note: these readings / videos are suggested for additional context / examples, but not required.

  1. Severance Ch5: Iteration.
    readingvideo
  2. Ch7: Iteration. ThinkCS