Lecture 3: Iteration
At a glance
- Price Free to watch, no sign-up
- Runtime 47 min
- Topics Computer Science, Education
- Source MIT, Introduction to CS and Programming using Python
- Lecture Lecture 3 of 25
- Language English
MIT lecturer Ana Bell continues the 6.100L Introduction to CS and Programming using Python course with a session on control flow through loops. She covers while loops, which repeat as long as a condition holds true, and warns about the danger of writing one that never terminates. She then introduces for loops, showing how they step through ranges of numbers and the characters of a string. The lecture is syntax heavy, with Bell working through code examples on screen and pausing to flag common mistakes beginners make with loop conditions and off by one errors. It is the third lecture in the Fall 2022 edition of the course, building on earlier material about variables and expressions, and sets up the iteration skills needed for later topics like functions and recursion.