WEBVTT 00:00.210 --> 00:05.520 So in this lecture we would have tried to understand what is the difference between the for loop and 00:05.520 --> 00:06.350 the way up. 00:08.520 --> 00:14.350 We will do that just by riding this simpliste be called one of the while loop and one foot of the foreign 00:14.350 --> 00:14.940 loop. 00:15.100 --> 00:19.800 Their programs need to count up from one all the way to 10. 00:19.810 --> 00:25.420 So at this point I strongly recommend he had to pause the video intro to create discord and your own 00:25.620 --> 00:27.950 interest to check your level of understanding. 00:28.140 --> 00:37.030 Federal initialise any sequel to 10 then recreate the four law for buy in at Aints one because we want 00:37.030 --> 00:43.120 to start from one all the way to N as were other doctor about in this part of the chord. 00:43.180 --> 00:47.380 You will get N minus one because this is a fact in the 4 look. 00:47.380 --> 00:54.820 So we need to ride n plus one in order to count all the way to 10 in the cordon because finally we would 00:54.820 --> 00:58.420 print a little themselves. 00:58.900 --> 01:00.550 One to three although wait. 01:00.580 --> 01:01.010 10. 01:01.100 --> 01:08.350 Okay let's try to do that with wine again when you have a variable that counts the numbers for without 01:08.380 --> 01:10.010 having a Year's Day. 01:10.270 --> 01:18.490 As you can see here I start with one showing the why load we need to initialize day is equal to one 01:18.790 --> 01:28.660 because the Y lobe don't initialize environments sold while day vs less than n. 01:28.960 --> 01:30.250 So even the J. 01:30.280 --> 01:34.260 Use 1 2 3 4 9. 01:34.510 --> 01:40.570 This loop will Iran again again but we one also you the loop is equal to tend to run again. 01:40.570 --> 01:48.640 So here we ride less or equal to 10 or else n because we only supplies it here in here we are putting 01:48.640 --> 01:49.540 that is out. 01:50.540 --> 01:53.680 If we drive this cord we really get this output. 01:53.780 --> 01:57.550 As you can see here we have a law that never ends. 01:57.590 --> 02:04.810 Because here we start with a sequel to one we tell to the little that when you carve day less than 10. 02:04.850 --> 02:11.200 So one is less than 10 between today so you will print one again and again. 02:11.280 --> 02:13.640 And you don't have any ways to stop the loop. 02:13.640 --> 02:17.770 It is very important to count part for the sake of day on your own. 02:17.900 --> 02:19.990 So do you difficult to buy one. 02:20.850 --> 02:26.890 Without a way you would close the loop First we will have a second one then a single country plus one 02:26.890 --> 02:27.760 so days ago. 02:27.780 --> 02:32.750 To enter one all the way to the T is equal to 11. 02:32.780 --> 02:34.740 When do you sequel to 11. 02:34.800 --> 02:37.850 You will come here Zee is greater than 10. 02:37.980 --> 02:39.120 So we will stop it. 02:39.120 --> 02:46.050 Look let's ride that one all the way to an end one all the way down and follow the while again. 02:46.810 --> 02:49.890 As always you've Gordon Gates.