Welcome, welcome, welcome, and this lecture will continue discussing if statements and this will
be the closure of theory.
And first of all, let's begin talking about a term which is called and pass statement.
So the statement is used as a placeholder for future code.
You can see him as a sort of a gate to the flow of code and no active action is made once once it is
executed.
So what actually happens once the code meets these that pass statement?
So first of all, when the first statement is executed and nothing happens, surprising, right.
But it has its advantages and it has its purpose.
If used in an if statement, empty code will be allowed, meaning, for example, you have a random
if statement.
So usually you have like if something, for example, bigger than a number, then you put the two dots
and then under the if you put some code, for example, print something, if you leave the place under
the if empty, you will have an error.
We will see it in a few minutes.
So B if the pass statement lets us to leave that place under the if empty without an error.
All right.
So the third Thurbert, without bas having an empty code under the F will raise an error.
And also that allows you to take a passive approach in if statements.
All right.
So let's see some examples right here.
All right.
So here we have an example of an if statement, really simple one.
We have A equals thirty three.
B equals two hundred.
And right here under the if we stay here, if B bigger than A, which is true.
So we want some code to be executed.
So you can see here let the part if empty without a print action.
So under the F right here we don't have anything, we don't have any print, we don't have nothing.
Also Bas is missing and you can see a small error marker appears.
You can see the small red marker right here.
This means we have some error in the code and once we execute the code, we simply get that syntax error.
OK, so our execution fails because we haven't put anything under the IF and this is a wrong approach
for coding.
All right.
You want to be the best, so you don't want to be to do these kinds of mistakes, having some syntax
errors as simple as that.
All right.
So this example is without having anything under the F, and this gives us a simple error, syntax error.
And right here you can see the second example with the same if condition.
And you can see also under the if we don't have any print, we don't have anything here.
We just added a statement mentioned here.
And you can see there is no red marker that indicates of a code error right here.
And also, once we execute this code you see here, process finishes finished with exit code zero.
This means we do not have any error in the code once executing.
All right.
So in some occasions you would like to do nothing once you get inside and if statement or inside an
ELIF or inside and else, you just don't want to do anything.
And the pass statement lets you do it and that's about it.
This is the purpose of BAS and I guess you will see it in the practice part as well.
It's not very complicated, but it is crucial to know it because you're going to use it also in future
topics as well.
All right.
So we're finished with this lecture.
I will see you in the next video.
Thank you.