OK, now it's time for the conditional or else elf statements.
OK, now it is as simple as that.
The syntax is like this.
You put the F and then you put either brackets or without brackets.
But I prefer with perfect brackets, actually.
And then you put the condition and the condition.
If it is true, then it will print.
So yeah, let's put an explicit value, which is the all this will be on that F body, which is this
one.
So let's print.
Yes, it is true, and you can use something else, so if it is, it's yeah, let's bring it this time
it's print.
No, it is false.
OK, so by the way, this will Brent yes.
By the way, because the because the condition here is, too.
So let's have a look here.
It's clear the screen and you can see, yes, it is true, which means that it worked correctly because
we the condition is true.
All right.
Now it's time to have some variable some things actually worked or used in real world, not just simple
statement.
So let's put far one equal.
Ten and here inside it, I would bet that if we one less than or greater than or equal equal, then
use this equally equal or not equal.
OK, you can use this, but for now it's use less than 20.
Only less than five, so it is in this that five not force it will bring not with this force.
So let's check this out.
No, it is.
OK, now, actually, we can put a boolean variables here so far to this put this time Fourth's, OK,
or let's put it as a tool.
So to ensure a different set and value or different output, and here you can just put the name of the
variable.
This is the first one.
So the name of the variable, you will do the job because if the bato true, if it is too far to his
torso, which means that the output of the condition here is true, which means it will print here,
or you can put or use the equation equal operator.
So equal, equal and it is equal equal to Attrill.
So this time it will print here because it is actually it is true.
So it will print.
Yes.
If there's.
But by the way, if you put the Barthel which is the true equal.
Equal to false.
Now, it's far too early to know, so this time.
It will bring no, it is false.
OK.
Now it's up to you how you write your programs, why you to use the condition when to use it.
What condition you can actually put subtraction addition divided by two modules actually depends on
what your your case.
Now, this is the first syntax, which is if it's OK now, actually, what if I want to put inside the
answer, which is something called the nested officials here.
Now, actually, there is something called indentation.
You can see that here.
The if you start from here, as you can see, and we put the colon here and here is an indentation,
which means, as you can see for spaces, which means that this print statement is inside the body and
the else, the same thing, one, two, three, four, four spaces.
And here I can bootprint or whatever I want here.
This means that this brain function or this statement is inside the body.
OK, but because actually, if I what if I put it like this so it isn't anything nor anything if I removed
the indentation and this is what inside the python like this, this would give us an error.
So if I type here.
Yeah, you can see expected and intended block, which means that you forget something.
So you can but this actually the bi type two spaces.
So let's see.
Yeah.
Jeanine's what you can see that if I type two spaces it would work.
But actually it's better to use for spaces because it will be more elegant and moderne way to write
your code.
Now one last thing.
So inside the elsea I can put another if this is what I want to talk about.
So if I type if an address and whatever I want, then inside it wherever and for that else.
So you can see statement here and inside you can see what else as well and but whatever you want and
then you can print whatever you want.
OK, so actually so here another example here you can see this is outside of the LS but if I put it
here like this, like this now that actually this is inside the else and this is inside this if and
this is outside the elsea, OK, I think it is a symbol because if you are using your studio you can
see that it is highlighted.
We have lined this here, which means all of that is the name of that.
You can see that all of that is what else.
And here all of that is for if and so on.
OK.
Now, the last thing I want to say about or talk about, which is the ELIF.
OK, now this is another thing, which is a combination of Elz and if so in if ok so elif what the condition
you want and the same thing with indentation and so ok, but don't forget to put indentation here like
this, which means that this is inside the left.
OK.
And of course you need to remove the entire.
Nyqvist.
So, yeah.
Everything is expected, so you know what the first condition.
OK, then you use the second condition, then you use a third condition or fourth condition.
OK.
OK, so you need to to have more filtering so you can use that instead if it's all right.
Now, actually, this is just a simple overview or brief about if and the condition and operators.
OK, now don't worry about that.
We would use that in practice when times come to when we started writing our own tools.
Actually, in a very practical way, so for now, just keep in your mind, what is the syntax, how
to write, what are the statements, how they work?
And we learn that we have if we have is we have it is we have it.
If L.F. then instead if I mean and else whatever.
OK, so and we learned that we have internation.
So this is to distinguish between which statement for which instructor or which instruction.
So this is for that and this is for the F or F or if this is for the ILS and so on.
OK.
Thanks for watching.