This video's title is Simple Incremental Loop. To begin, we're going to start with a simple incremental loop. Incremental looping is really the most common form of looping that we're going to use in this course. We typically use it, although not always, we typically use it though in combination with the range function. So it's really important to understand how this function works in conjunction with the incremental loop. As I described in the lesson, there's a very specific structure to how we write the loop. That we have an incremental loop variable that follows the for, and that this first line ends in a colon, which then gives us the indent. So the indent is very important. If for some reason, let's say, I forget to put that colon in, if we take this line out, and I hit "Enter", I'm not going to automatically get an indent. If I put the colon in and hit "Enter", I do get an indent. So that indent is important because it defines what is inside of the loop. As soon as I go back, if I want to go back outside of the loop, I have to undo the indent. We're going to see a very similar structure for conditional statements. We'll also use a colon and an indent. So it's very important structure to understand and the code is not going to work properly if I don't have that structure in place. Let's put our line back. So we're going to print out i. Remember from the lesson, range is a counter, and if I have just one number in the range, it is going to be my stop. Run this. Here it's showing me the first time through the loop, i starts out at zero, and it goes, and essentially the loop, this is asking the question, is i equal to whatever number is here in the range? The first time through it's not i is equal to zero, and so this is acting like a counter. Oftentimes two people will ask, "Can I use floats in the range decimal numbers?" You can't. It works with integers because it's a counter, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, etc. So it has to be in integers. So i starts at zero, and the first time through it prints that out. These are sequential lines that it's printing out. Each time through it's going to print out whatever i is. It does that till it gets to nine. Nine is the last thing it prints. After it's done printing nine, it goes back up to the top of the loop and i becomes 10, and then the loop asks the question, is i equal to whatever number is being held here? If it is, if it returns a true statement, then it jumps out of the loop and it goes to whatever the next line of code is. If there is a next extra line of code, in this case, it prints done. That's the structure of a loop. What it's returning is a boolean. We don't see the boolean, but that's what it's returning. All those times through, the answer is false. The first time through, i is zero, it's not equal to 10, so it returns a false. So it does what's inside of the loop, which is print i. A quick shorthand for remembering what we can do with range, if I add a second value here. Let's say we add a two, that first number is our start. That changes where i begins, where my counter begins. If we run this again, it starts at a two, instead of at zero. If we add a third, that's going to be our step. By default, this is stepping by one. If I add a three, it's going to step by threes. So this is going to start at two, step by threes. We see that it stops at eight. Why does it stop at eight? Well, because the next time through it's going to add 3 to i, so i becomes 11, and it's asking the question, is it equal to or is it greater than, what this is? That's really the question it's tasking, and it's greater than, it's 11, so then it doesn't do what's inside of the loop. What's one small thing that we can do with this? Well, let's get it to generate some geometry. Let's go back to our range of 10. We'll simplify that, and we'll say, instead of just printing i out, why don't we use it to add a point? In the position of x, we'll put i and we'll keep y and z at zero. Let's see what that does. We could change this an incremental loop to generate points. Now it's generating points. The first one, since my first time through i is zero, and the next time through i is one. It puts a point at 1, 0, 0, and then it puts a point at 2 , 0, 0, so on and so forth, all the way through. What we could do is, we could also change this. We could say, what if I didn't want x always to be equal to i, that what if I wanted it to be by fives instead of just by ones? We could write a line here that says, define x in terms of i, and write a little equation that sets x equal to i times 5. First time through, i is 0 times 5, that's going to be zero. So it still start at the origin 0, 0, 0, and we're going to change this to x. Let's just delete this. Now we're generating a row of points that are going by fives. I'm going to stop there, but we're going to build on some of these concepts with the next few lessons.