Right now, another thing here actually used not just in the loop, actually in the loop while loop
for loop, OK?
The condition, something called continuo or break or Besse.
OK, so let's have an example.
I equate zero I is less than 10 this time.
No, I will keep updating our I will keep everything that I value.
OK, but here I would have a condition inside the while loop.
As you can see, we are in the side the way loop.
So if I equal equal five then I will.
Three.
OK, now photo me just in this examine and see what will happen.
So.
This should print only from zero to five because we already printed before.
OK, before this condition, I mean, now the break here, actually the statement will break from that
current loop or the current loop, which is there when we have it as a way loop.
OK, now let's have a look here.
Let's clear the screen first.
Now you can see that it is infinite loop.
Did you guessed why?
Yeah, because we forgot to add here.
Yeah.
Actually, we forgot what I mean.
That's one.
All right.
No, actually, it's good that we saw that in practice, what is infinite loops?
Now, let's clear the screen and let's so you can see that we are printing from zero to four.
OK, now.
As you can see, when we increased, when it went when it became for point four, four plus one, which
means five now if it is five, equal equal five, yes, then break.
So it will bring it from zero to four.
And which means that we bring it five times.
OK, now let's have another example for continual statement.
No, it is continue.
Now let's have another Syntex now.
This time the sprint, these after the if condition, OK?
So I will have it here, but again, it is inside that that while indentation, so let's print I and
let's increase the value equal I plus one.
Right.
OK, so if the value is five this time, I will continue.
OK.
OK, now you may ask me what is the continuum.
Now we don't.
What is break break break from the current loop.
OK now continue.
Which means that continue immediately to the loop.
Right.
So this will give us an infinite loop.
Why is that now.
For me I equals zero.
It will keep keep until it is reached for so for less than ten.
Yes it is for equal equal five.
No.
So I will not do this condition and I would go print for now for this one which is five.
So the new value is five.
Five less than ten years.
Five equal five.
Yes.
Continue.
So I would go again.
Five.
Less than ten.
Yes.
Is five equal.
Equal five.
Yes.
Continue.
So this will give us an infinite loop.
OK, so it's this this out actually better to have it relection.
So yeah, you can see that we have an infinite loop but without printing anything, as you can see the
cursor is stopped moving.
So which means that this is an infinite loop and actually this is back.
So to avoid that we would add the AI equals AI plus one here and we can remove this or you can put it
out.
It's OK.
Nobody.
So now let's have a look.
Yeah, you can see that this time, one, two, three, four, and you can see or you can notice that
five is not here.
Now, what is that?
Let's have another look now when we reach for four, is this done 10 years for this one right now?
If it is five, let's continue.
So it is continuous.
It will return again.
So five.
Less than ten.
Yes, but it will increase.
So we didn't print for five at all.
So six.
Yes.
Is I equal.
Equal six.
No.
So I would bring six over over until I reach ten actually or nine.
And what you may ask me.
But why it is ten.
Because if you have not this year.
So when we reach nine nine instantaneous.
I added here as you can see I didn't get from I added nine plus one which is ten and I printed out.
OK, so that's why it is then this time.
OK, now finally we have another thing which this time called this.
Now this means that don't do anything, just bas this.
Now what is that exactly.
And why it is used now.
Sometimes you wrote functions or your specific indentation and you don't need to do anything currently
or you don't need to do anything just to check if it is something or not.
OK, and you don't need to include anything, you just need it to be empty.
But you know that empty is not acceptable with with Python.
So if I removed this and what if I equally equal five without anything inside it?
So it it's just it's out of this.
I actually it's better.
And if I run this, you can see that expected and indented block, which means that we need to put something
here.
So how to do that?
Actually, we will use the best, which means that in this indentation or this block, there are nothing
but actually not nothing.
It is best.
So just does that.
So let's have a look here.
Let's run this.
Let's see what will happen.
Let's clear the screen first.
Yeah.
You can see this time we printed everything, but this time five is included because we didn't continue
when it is five.
So we already print that.
So which means that when we reached five, we did nothing.
OK, and we Brantford.
OK, that's it.
All right.
Thanks for watching.