1 00:00:01,830 --> 00:00:05,530 They're just lovely to see that and check out the violin in case of Cartland. 2 00:00:05,550 --> 00:00:08,520 Now the syntax on vinyl is pretty simple. 3 00:00:08,520 --> 00:00:14,400 So for a while you just need to use vinyl followed by backward open and close. 4 00:00:14,410 --> 00:00:22,880 Now inside this you have to simply define the condition such as is smaller then let's c then our eye 5 00:00:22,890 --> 00:00:24,750 is more than equal to 10. 6 00:00:24,750 --> 00:00:31,140 Now what I see is a counter variable that will help you to continue with the loop till this condition 7 00:00:31,140 --> 00:00:32,450 becomes false. 8 00:00:32,460 --> 00:00:35,320 So we have to simply initialize the value. 9 00:00:35,340 --> 00:00:37,770 So here I simply initialize the Gounder video. 10 00:00:37,790 --> 00:00:45,840 But I see I call on in equal to let's see when inserted the value where they really do. 11 00:00:45,840 --> 00:00:48,640 I mean the same here that I do print all the values. 12 00:00:48,840 --> 00:00:51,450 Let's see if print line. 13 00:00:51,690 --> 00:00:53,090 In the value of i. 14 00:00:53,250 --> 00:00:53,770 Right. 15 00:00:53,910 --> 00:01:00,570 So this is the syntax of why you now are the largest increment of value of i by using the unity operator 16 00:01:00,600 --> 00:01:02,670 of a listless. 17 00:01:02,720 --> 00:01:05,250 And now let's just read the code and see. 18 00:01:06,320 --> 00:01:11,780 So here we go in the output we get one two three four five six seven eight nine and 10. 19 00:01:11,780 --> 00:01:17,660 Now suppose if I ask you to write a program to print all the even numbers starting from and then they'll 20 00:01:17,750 --> 00:01:18,300 then. 21 00:01:18,320 --> 00:01:19,930 So what you do in that case. 22 00:01:19,940 --> 00:01:23,690 So here what they will do I would simply write a if condition. 23 00:01:23,720 --> 00:01:29,390 Let's see if I Margulis two is equal to equal to zero. 24 00:01:29,510 --> 00:01:32,170 Then in that case simply put in a value. 25 00:01:32,270 --> 00:01:35,320 And finally Ingram's in the counter by when I. 26 00:01:35,600 --> 00:01:37,640 So let us know what are called. 27 00:01:37,670 --> 00:01:40,920 So here we get to 4 6 8 and 10. 28 00:01:41,120 --> 00:01:45,430 So this was all about the While loop in case of Cartland. 29 00:01:45,530 --> 00:01:50,050 And now if you are a big In case of programming then please watch this video. 30 00:01:50,080 --> 00:01:54,570 Otherwise if you know how does available works then simply jump on to the next video. 31 00:01:54,640 --> 00:01:55,200 Right. 32 00:01:55,370 --> 00:02:00,450 So as a beginner please watch this video now is an index of light. 33 00:02:00,560 --> 00:02:02,660 So here while the conviction. 34 00:02:02,810 --> 00:02:08,520 And then we put our record here and then increment or decrement our counter variable. 35 00:02:08,600 --> 00:02:10,920 So this is a syntax of value. 36 00:02:11,010 --> 00:02:13,630 Now let us see an example on the left hand side. 37 00:02:13,640 --> 00:02:17,810 So here I have the counter variable A and equal to zero. 38 00:02:17,810 --> 00:02:23,100 Now I have available within which I have some condition I is smarter than three. 39 00:02:23,120 --> 00:02:29,730 Now if I is smaller than three then only execute the code present inside the loop and simply print hello. 40 00:02:29,750 --> 00:02:33,770 Right now at the end there just increment the counter value. 41 00:02:33,810 --> 00:02:37,310 Let's see by when by simply using ipe listless. 42 00:02:37,310 --> 00:02:39,570 Now how does of-I loop. 43 00:02:39,820 --> 00:02:46,100 Now if you underscored then it will simply print hello two times in the output by using loop when loop 44 00:02:46,160 --> 00:02:49,030 2 and loop 3 as usual. 45 00:02:49,130 --> 00:02:51,440 And at the end the loop will terminate. 46 00:02:51,470 --> 00:02:52,010 Right. 47 00:02:52,100 --> 00:02:55,190 So the control flow for the loop is like this. 48 00:02:55,190 --> 00:03:00,170 First check the condition and then execute the call and then implement the counter. 49 00:03:00,170 --> 00:03:05,130 So when the first group is executed the value of i is actually zero. 50 00:03:05,240 --> 00:03:10,820 So zero is smaller then which is actually true service simply print hello in the output console and 51 00:03:10,820 --> 00:03:14,470 at the end it will simply increment the counter value by 1. 52 00:03:14,570 --> 00:03:15,680 So I will become. 53 00:03:15,680 --> 00:03:18,990 Now when I write with the help of this I priceless. 54 00:03:19,160 --> 00:03:26,570 Now this value of equal to when will now appeared at the very initial point of the loop to where the 55 00:03:26,570 --> 00:03:27,990 condition will be checked. 56 00:03:28,100 --> 00:03:30,760 One is smaller than three which is again true. 57 00:03:30,860 --> 00:03:31,500 Again. 58 00:03:31,610 --> 00:03:33,290 Hello in the output console. 59 00:03:33,410 --> 00:03:34,940 And then I place bliss. 60 00:03:35,030 --> 00:03:37,390 And finally it becomes two. 61 00:03:37,490 --> 00:03:44,180 Now this value of i and i just do again comes in the third loop where the condition again becomes true 62 00:03:44,270 --> 00:03:46,790 because two is smaller then three right. 63 00:03:47,030 --> 00:03:49,950 And again we print Hello I'm blessed blessed. 64 00:03:50,030 --> 00:03:53,300 Then again at the end of the loop I becomes three. 65 00:03:53,300 --> 00:03:56,700 Now here comes the twist since it becomes three. 66 00:03:56,870 --> 00:04:00,730 So this will again try to initiate the for loop there. 67 00:04:00,730 --> 00:04:06,370 That condition will actually become false because 3 is not smaller than three right. 68 00:04:06,380 --> 00:04:12,500 So the condition becomes false and the loop dominates and we get only three times hello in the output 69 00:04:12,500 --> 00:04:13,170 console. 70 00:04:13,280 --> 00:04:15,900 So this is how the available works in case of Cartland.