In this video, we are really talking about the loops.
So loops are so much important that I want to put in one 200 numbers.
So I can go ahead and do.
And if you go and run this and we can see like this, we want to do 400 number.
So it's practically impossible.
So what we can do is we can use the loops we were discussing about the for loop if loop and wide loop.
So these are the main important loops will be using.
So first, let's discuss about that for a loop.
So the first takes the syntax like this.
In this we need to do three statements.
That is the starting condition so I can declare a variable into I is equals zero.
Generally I use it for looping the variables i.e. stands for retrieval.
So it's, it's kind of like that.
So I and these are the common for the loop variables.
Now this is the starting statement.
No, I can just see my current and I need to see at which point my loop shouldn't.
So we want to put in a hundred numbers so I can say I less than is equal to 100.
And then what you want to do for each step, we need to increment this one.
So increment is adding the value by one.
So I can just say I.
I pressed press, and now this rule continues until the high value becomes one.
Now, if I go and print this, let's say hi.
So the first when the first loop is executed, the ivory will be initialized.
And this statement only executes for the first time for this.
For.
So entire value is zero.
And then it takes the condition whether it is done or not.
And since you're doing this, then hundred, it's going to execute this code inside these braces and
executes this one.
I press first then of this quarter now I value becomes one and again this will be checked against this
condition.
This one is done is standard screw and again, execute this one and grow in this one.
So this process continues until the I great then that is one not one so it's going to run this.
And here you can see there are obviously hundred highs.
Now instead of printing just two, I can use this I to print onto the screen so I can run this.
And here we can see from zero to under.
So this is how you lose the fat group and we can do the same with the value way of the condition.
So this white loop is very similar to understand, very easy to understand why this expression becomes
fast.
Until then, go on and it's good.
This one.
So let's go.
And let's do.
We need to be clear like this in the U.S. and Europe.
This takes only one expression.
To get less than 100.
Brendan, you.
So I'm going to comment this one.
So what we are doing is first we have the days go to zero and this white loop is taking, uh, Mother
Davis then handed.
And if that is true, we are executing this fun.
Now, if I go and run this and here you can see the program in fine and we execute this, right?
Because there is no stopping condition, because the value is not changing in this room and we are taking
the same condition over and over and good in the same code.
So that's why the improvement should be done after the code plus press.
Now if I to run this and here we can see zero 200 I think it's 99 because there is still no run this
we get the hundred numbers.
So care should be taken to add the growing value at the end of this course.
Otherwise you're gonna do this infinitum.
So this is the way loop.
And the next one is the flu.
So if flu bees are used for condition taking.
So if you want to take the value that is greater than or equal or less, then you are rejiggered some
instructions or otherwise, you know, take good value added instructions.
Sort of two ideas equals two.
Order to convert the to 32 off.
So let's just take the user and put the.
And there you are, the.
So what we're going to do is we're going to print something up.
You've done the indexes.
You've got the brackets in this.
We need to put the expression.
You've already used courses, Gertrude.
Zero.
Then that means we can say we can print to the.
Is clean.
You are group.
So now if you if I go and run this one task for my tour.
So it does not print anything.
So it's gotten good.
The input at zero.
Now it prints something.
You are.
And if you want a good record, you can use it.
So remember that it cannot exist without a single.
If so, there should be at least a singing of you when there is a.
So yeah, this is like, uh, not I agony not not of this expression.
So if I didn't execute this, otherwise execute this one.
So for whatever the value of other than zero, this could get to execute.
We can say you are not to.
So it's going you are 23 and you can see we got out, but you are not.
And it's go, go.
And you know you are.
And we have something called the loops.
So if this.
You can have a look inside group so here we can see we have it is equal to zero and then.
Then we can relate some cold.
Ah.
Pejic Something you've, uh.
Let's, uh, let's.
Enter your name.
And now here we are asking the user to enter the name.
So if I can create another condition here, you name.
Name equals.
A chorus of group.
Then I'm going to print that.
You are?
So I can comment on this one.
So let's go and run this one eye integrity gyro.
And now we can see this loop has been entered.
Now it's asking for the user input name.
Now let's root.
And here you can see we are done.
You are.
We can also put URLs.
You are in a men's and women's group.
So zero and I consider taxes now I will get the output as you are an admin screw you are an admin.
So.
So you can use these conditions.
If you just practice for a little time, you can easily understand this, uh, multi-level condition
taking.
You can also check whether the where you are is not empty or not.
You can check like this if off it.
So basically, if it's not zero, it will take the as if true.
Otherwise it's going to take it as false.
So.
So this can also be used for taking the variable easier and saying or are not.
So the tougher these groups these are, the major groups will be normally using in our day.