 Okay, continuing our series with Python 3. Again, I'm putting out a new video every Wednesday, so if you're watching these as I put them out, expect the next video next Wednesday. There should be an annotation on the screen for the full playlist. I recommend watching the previous videos before starting this one. And of course, if you're watching this in the future, you can watch them all at once. You don't have to wait until next week. Anyway, last week we were, last two weeks, we were working with While Loops. Well, today we're going to start with if then statements, which are very important. In fact, I probably use them more than I use While Loops. I don't know. Probably about the same. But you really can't have a real program without an if then statement somewhere in it, because otherwise it's just running through, doing something it's not checking. Is this true or that true? And that's what if then statements do. And unlike a while loop that does check if something is true or not, a while loop will continue doing it until the value is what it's supposed to be or not supposed to be. And if then statement basically does it once and then continues on with what's after it. So here I am and I'm in the interpreter for Python three and I am going to create a variable. I'll call it X and I'll say X is five. So now we have an integer X is an integer. It's equal to the value five. It's the number five. So now I can say if X is less than eight, we're going to do something. And again, it knows where the statement begins and then based on tabs or indentations I should say. In fact, tabs can throw things off. So in actual editors, it's recommended either use the space bar or you set the tab value in your editor to be a certain number of spaces. Anyway, right now we're going to say print and we're checking is X less than five and we'll say it's less. I'm sorry is X less than eight and X is five. So when I hit enter here and hit enter again to run this if then statement, it says it's less because five is less than eight. But if we were to do this again and I was to say if X is less than three and I'll give it that same print statement and run it again, it does not print out. It's less because five is greater than three. So now we're going to go to the get to the else part of the if then statement. So basically if then else, we're going to say again, if X is less than three, we're going to print just like before it's less and then we're going to say else. And we're going to say, oops, sorry, there's supposed to be a colon after else. So we'll do this again, hitting up arrow again to go through my previous commands. And I'll say else colon tab in there and I'll say print nope comma it's more. Okay, so let's look at this before I run it. We're saying check and if X, which right now is five. So basically put a five there. If five is less than three, say it's less else. So if it's anything other than what we're saying up here, we're going to print nope, it's more, which should because five is more than three. Nope, it's more. So that's a basic if then else statement. You can also have a if else if and else statement. So again, X is five. So I can say if X is less than three, we're going to say print it's less. And we can then also say instead of else, we can say LF and give it another statement. And we can say X is equal to five colon and we can say print X is five. And then we can give it an else saying if it's anything else that we're going to print. And again, I forgot the colon after else. So we'll say just go through it all again. It's less else if it's five. Really that should be a lowercase X. Not that it's going to mess up our program, but X is X and capital X is something else. And then we're going to say else colon, enter, print, nope, inside quotations, nope, it's more. So let's look over this before we run it. So we're saying here is check is X less than three? If it is less than three, then print it's less. Now, if X actually equals five, and this is equals equals, the reason for this in most programming languages, I don't know if I should say most, but many programming languages has equal, equal to set the value because if you just did, well, I say we're not setting the value here. We're checking the value because if you were to put just one, then you would be setting the value. So we're actually checking the value of X. Is it five? That's why we do equal, equal. So if X is equal to five, then we're going to print X is five. And then we're going to say if anything else, which is the only other option is that it's more, we're going to print it's more. And if I enter, enter, and it says X is five because X does equal five. Now, this was our first little look at if then statements. We went through if, we went through if else, and went through if, else, if, and else. And you can have multiple of these if else. You can have it check each number. You can have a check, you know, if X equals four, then do this. If X equals five, then do this. If X equals this, then do this, and then that, and that, and that. So note that you can have multiple of the L ifs within an if statement. So this was just our first look. Next week, we're going to look a little bit more into this. We're going to play around with some number values as well as some other things. And that's it for this tutorial. Again, this is part of a playlist, a series that's ongoing. Every Wednesday I'm producing a new Python 3 video. Be sure to check out my Monday and Friday videos as well on other topics. But there should be an annotation on the screen to the full playlist. Thank you for watching. Please visit my site, filmsbychrist.com. Chris the K, there should be a link in the description, and have a great day.