Learning objectives - Video Tutorials & Practice Problems
Video duration:
1m
Play a video:
Video transcript
<v ->So, welcome to Lesson Four: Work with Lists and Loops.</v> In this lesson, we start incorporating loops into our programs so that we can instruct the computer to repeat a piece of code multiple times. We also look at our first data structure, lists. In other programming languages, lists might be called arrays or sequences. But Python likes to keep it simple. First, we look at "while" loops that repeat a piece of code until it's told to stop. Then we use a "while" loops to improve our number guessing game and reduce repetitive code. Next, we'll look at lists. You'll learn how to create a new list, retrieve an item, and manipulate the list in different ways. And then we go over "for" loops which allow you to loop over each element of a list. Then we use everything learned so far to create a word-guessing game. Finally, we discuss techniques you can use to make you code cleaner and more readable. We also look at simple ways of testing your code and making it more robust.