Hi this is for things that are.
And welcome to the next video of discourse of Cartland programming series.
Now in this video we will learn about the Raiders in case of Cortland now similar to Java and any other
programming language we have for loop VI loop and do a loop in case of Cartland.
And also we have break and continue statements to execute our called aspart.
Our wish.
Now first of all why do we need to.
So as a beginner.
You might ask this question.
Now suppose you want to print Hello.
So it's full effect fine.
You can simply type in line.
Hello.
Now you want to print hello let's.
Multiple times so you will simply type in line.
Hello multiple times and in the output as well.
You will get.
Hello 4 times.
Right as a beginner you will go for this option.
But let me tell you this is not the way to do it.
If you have some kind of factoring out word then in this situation we have to make use of loops.
Or you can say the iterators.
Now here to shake out what are the syntax of for loop like loop and do while loop.
Now in case a for loop we have this syntax for followed by function.
I.
This is the ranges.
Now this one dot Darkfall is actually the range that we already saw in the previous video.
So I in one Dogbert for that simply means I will have the value of 1 2 3 and 4.
Now inside this latest print hello for games like this.
Now similarly while loop has its own syntax such as vyle is smaller than 5.
Now here it is actually the counted very well.
Now insert the value.
Begin simply print hello and then incrementing the counter variable.
I blissfulness and now at the end we have to wait to hear what they really do.
This index is due followed by curly braces.
And here we have light that will simply check for the condition and now insert this.
We can simply print hello and then increment the counter.
So the syntax of do why loop and why loop is exactly the same as that of Java.
The only difference we will find is in case of for loop.
Right and now let us check out the structure of the loop.
So inside the loop structure we have Van Gundry very well like I and II here and also here.
Right now Next we have a condition check.
Now in case a for loop and by loop.
First we are checking the condition and then only via exec the code.
But in case of do a loop the first executing the code and then checking the condition right and then
at last we have incrementing and decrementing of the counter such as.
Here I bless this A-plus bliss.
And here as well english so far Lou it is actually getting incremented internally.
So this was all about the syntax of for loop and why loop and also do a loop.
Now next let us not proceed and check out the loop control statements.
In case of Cartland.
So in Scotland we have the Greek statements Gunday new statements and also the returns statements that
I will talk about it shortly.