 What's going on guys? Root from NoShield.com here today and today we're looking at more Python. Now in this one we're going to be checking out some testing operators. Now this can include comparison operators and membership operators. And this may very well turn into a bit of a long tutorial. So strap on your seatbelts and let's get rolling. I'm going to start up idle and you can do that exact same thing and we can work together and make some magic happen. I'm going to drag this over here, let's create a new one, a new script, a new file, a new program, whatever you want to call it. I'm going to get my shabang started here. USR, bin, environment, Python. Look at that. Alright, I'm going to save this as a filed up Python. Overwrite whatever is there and we can get cracking. I'm just going to print something so we know what's happening. Like welcome to the world. And now let's set ourselves a variable. I'm going to stick with versions like I did in the last example because I thought that was pretty cute. So let's get started again. Let's get our if statement going. Hope you guys remember the syntax. It is obviously if. And you don't need these parentheses but they're a good habit to get into and you're going to want to have your condition in here. And then you can have your code block down here. So if versions is equal to 72, actually let's change stuff around. Let's create a new variable like what bin Laden said. 72. What bin Laden said. Alright, we can get out of that conditional statement and let's create a little something so we know what's happening afterwards. Come back soon. Sweet. So now we got everything set up. We got our skeleton program and we can start checking out what we want to check out. We're going to look at the comparison operator for the is equal to just like we did in the last tutorial. This is going to keep things easy for now and let's see what's happening. So I'm just going to print bin Laden was right. Okay, let's run this and we get welcome to the world. So that's fine. It's before if conditional statement and then we get to it says bin Laden was right because virgins was equal to what bin Laden said. Come back soon and yeah, that's good. Now let's give ourselves a little bit more functionality here. I feel like this is kind of cheesy. So let's print it. Let's get a new line going there and let's set virgins equal to raw input. How many virgins did you find? Don't ever ask anyone this on what you're like walking down the street. Okay. I don't I don't want to get the complaints. I don't want someone to call me up and be like, hey, root of the null. Someone just randomly asked me how many virgins did you find while I was walking down the street today. This is your problem and virgins here. So what we're going to do is if let's see. I want to convert this into an integer just in case we could use because I'm interested in seeing what will happen if we run this and the user types in a letter rather than a number because we could just use input to get an integer number. But I want to have a little bit more functionality in that see if we can do it. How many virgins did you find? Yeah, that's going to have a problem. Okay. Let's just try raw input for now. Keep things simple. So virgins equals raw input. So if we try this one more time, how many virgins did you find? I found 72. Bin Laden was right. I'm just going to create a new line here. I don't want anything in that string variable. So it just creates a new line. It keeps it easy. How many virgins did you find? 72. Bin Laden was right. Come back soon. Okay. Do it again. How many virgins did you find? 10. Okay. Nothing that time. So bin Laden was wrong. Okay. What if we change this to less then? What if we change it to bin Laden was a little short. So now in this case, if we enter a number of virgins that is less than 72 or less than what bin Laden said, it's going to let us know that bin Laden was a little short. A little, actually, over exaggerating. I have no idea if that's one word. I should look that up sometime. Whatever. Run this. How many virgins did you find? Maybe 30. Bin Laden was over exaggerating. Let's do it again. Let's say 100. Okay. That works fairly fine. It's wrong. We just skipped that conditional statement. That's good. We can do that exact same thing for less than, under exaggerating. How many virgins did you find? Over 9,000. 9,001. Bin Laden was under exaggerating. There you go. And now you can do this exact same thing with greater than and less than or less than and equal to. So now we can do 72 or greater. Let's try it. How many virgins did you find? That many virgins. Bin Laden was over exaggerating. Switch it back. Run it again. 72. Bin Laden was under exaggerating. Okay. That works. What if we did less than that? Let's say 10. Nothing. Okay. So it's understanding our comparison operators correctly. That's great. Let's do a little bit more. Let's see what this is all about. I'm going to comment this out for now. And what I'm going to do here is actually, there you go. Let's cover more of that. Okay. So now that we've cleaned this up a little bit, we can get started with some more processing because I want to use virgins and some more because they're my favorite thing in the world. And the virgins is going to equal 72 in this case. Same as before. And then what Bin Laden said, it can be 72. So now, if virgins is equal to what Bin Laden said, then we can do this exact same thing again. Print Bin Laden. Boin Laden. Oh yes, I can type. Bin Laden was right. Bin Laden. Oh my goodness. Bin Laden was right. Let's print this out here. Let's run it. And Bin Laden was right. Come back soon. Cool. So now what we're going to try is this is statement, is. If virgins is what Bin Laden said, you would think that this will run. And you are going to be disappointed if you don't already know Python. So here we go. And that does work as far as I know. Bin Laden was right. Virgins is equal to what Bin Laden said because they have the same value. But that's interesting. Because they're both integers, they have that same object or that same historical, I don't want to say historical ancestor because I feel like that's dumb, but they have that same background. They're both integers. They're of the same object. And we'll get into object terminology a little bit, terminology a bit more later on because it's more of an advanced subject, but Python treats data types like objects. And that will make a lot more sense once you actually understand what objects are. But for now, understand that Python does treat them as objects. So virgins being 72 and what Bin Laden said is being 72. If virgins is what Bin Laden says, that says Bin Laden is right. So, and again, you get that exact same thing because we haven't done much to change it. So, good stuff. Now we should look at the membership operator. This is interesting. This is another one that's a bit peculiar. Let's say our string here, needle, needle equals bomb. I feel like that's a little twisted. All right, haystack. Haystack can be bombshell. You guys understand what I'm getting at here? If the needle is in the haystack, we can display. We found the source of the ticking. I think it's I found the source of the ticking. I found the source of the ticking. There we go. I found the source of the ticking. Now this is because bomb really is in bombshell. And that's kind of exactly what that membership operator means. If this is in something else, then it'll run it. If because that string is inside that other string, it works perfectly fine. Let's change the value though. Let's change it to a big O. I wonder what will happen here. That specific string is not in the haystack. Does that make sense? We're going to be using in a lot more in some greater data types and things that we'll be talking about later on. But for now, you should know that it exists and that you can test for it in strings and that sort of thing. It's going to actually test if something is in something else. Python is supposed to be designed for that readability. That's exactly what you get with the syntax and the keywords and the naming. I feel like that's all. I think I've covered everything that I planned on covering. I hope you guys can be able to know and understand these comparison operators, understand the membership operator, whether something is inside something else. That sort of thing. Thank you for watching guys. Thank you for listening. I hope you could give me maybe a like, maybe a comment, maybe a subscribe. I don't know. It's your thing. Thanks again guys and I'll see you in the next video.