Hi, guys, and welcome in this lecture, we will discuss comparison operators on boolean variables.
All right.
So basically saying in Python we can take two values or two variables is the same and then ask a question
about them.
Are they equal?
Are they not equal?
Is one bigger than the other or one may be smaller than the other?
All right.
And this this is what comparison operators are in a few words.
All right.
So call person operators is a logical action taken upon two values.
When we want to compare to values in Python, we use these operators.
Then we will get a true or false value.
So let me ask you guys that question.
Does six equals seven?
Does this mean to.
All right.
I meant this one, there's this thing through or this is, I mean, false.
All right, so this one is a false idol because six doesn't equal seven.
So just like like I said, in operators, you just ask question upon two variables, or we can ask ourselves,
does six equals six?
So the result of that question is true.
Right.
So basically, that's it.
It's not very complicated.
And this is the logic behind it.
And this is how we put it.
This is the operator sine and this is how we can use it actually in the code.
All right.
So this sound means not equals meaning.
For example, three doesn't equal four or five.
This means bigger meaning.
X is bigger than Y, for example.
Seven is actually bigger than five.
So that's a true statement.
And the opposite way.
All right, so the next topic is boolean variables, all right, so these two are connected because
this is the Boolean.
This is the comparison operator.
All right.
This is the operator.
And this is the boolean variable.
The Bulan variable is just a simple variable.
Just instead of getting a string value or getting a float value or integer value, it gets a true or
false value.
Only it cannot have any other type of value.
So let's go over the definition.
In computer science, a boolean variable can contain only one out of the two values.
True or false, the variable is a very helpful one once we want to determine whether a certain comparison.
All right.
I'm just going to pause here for comparison, right.
In a certain comparison is true or false.
We can compare two variables using comparison operators and then get a true or false value.
So I believe variable is just a regular variable.
Same way as we studied before, because in Python, as we just as we discussed in earlier lectures,
we cannot determine the type of the variable from seeing from looking at it.
All right.
So it's just a regular variable, but it would contain only true or false values.
And that's how we know it's a boolean variable.
If it has a true or false value, it is a boolean variable.
All right.
So from here, let's do a quick example before we go into the code and see much more examples.
So this is an example of comparison operator and boolean variable together.
So that's very easy.
We have this boolean variable, which is Capablanca comparison status variable.
It's a boolean type of variable.
And how do we know that it is a booming variable?
Because here we have five is bigger than six.
So this one is a comparison operator and that's how we know that this is able and variable.
And once we print it, all right, once we print this variable, we will get an output of false high
because as we discussed, boolean variables can contain only true or false values.
So that was a quick preview of theory about comparison operators and boolean variables.
And in the next lecture, you will see much more examples.
And that's about good guys.
So see you in the next lecture.