1 00:00:00,920 --> 00:00:02,540 Biton while loop. 2 00:00:05,040 --> 00:00:11,430 So the while loop syntax in Python that while looping python is used to iterate over a block of code, 3 00:00:11,610 --> 00:00:17,790 as long as the test expression that that is a condition is true, when the condition is well, then 4 00:00:17,850 --> 00:00:20,780 it will come out from the white block. 5 00:00:21,330 --> 00:00:28,750 So we generally use the loop when we don't know the beforehand and the number of times to iterate. 6 00:00:28,950 --> 00:00:33,400 So whenever we know that how many times we are going to iterate, we are having the form. 7 00:00:33,600 --> 00:00:38,850 But if you don't know that, how many times we're going to iterate, then we shall go for this while 8 00:00:38,880 --> 00:00:39,450 looping. 9 00:00:39,720 --> 00:00:42,570 Because when the condition is through, the loop will get executed. 10 00:00:42,660 --> 00:00:46,500 When the condition is false, then it will come out of the loop construct. 11 00:00:47,130 --> 00:00:49,370 So here is the respective body. 12 00:00:49,560 --> 00:00:55,410 There's a while test and don't forget to get this on there and then body of white. 13 00:00:55,620 --> 00:01:00,840 So there is one indentation is there that will indicate that this these are the statements which will 14 00:01:00,840 --> 00:01:03,960 be under this while so intertwined. 15 00:01:03,960 --> 00:01:06,840 Look, the content will come this expression. 16 00:01:06,840 --> 00:01:10,680 If the expression is true, then the body of oil will get executed again. 17 00:01:10,680 --> 00:01:12,720 The test expression will be tested. 18 00:01:12,990 --> 00:01:16,500 And if the expression is false, then it will exit from the loop. 19 00:01:16,740 --> 00:01:21,590 So in this way, the respective python while loop will get executed. 20 00:01:23,500 --> 00:01:30,130 While loop with LTH syntax in Python, so let's think about that for the fort, we can have an optional 21 00:01:30,130 --> 00:01:33,490 S block with the while loop as well. 22 00:01:33,760 --> 00:01:36,280 The A's part is executed in the condition. 23 00:01:36,280 --> 00:01:41,710 In the while Loop evaluates to false when the connection will become false, then the start getting 24 00:01:41,710 --> 00:01:42,280 executed. 25 00:01:42,400 --> 00:01:50,320 When the condition is true, then the body will go on keeping their execution so the Y loop can be terminated 26 00:01:50,320 --> 00:01:51,100 with the break. 27 00:01:51,100 --> 00:01:54,820 A statement in such cases of ill spot is ignored. 28 00:01:54,820 --> 00:01:57,670 If there is some Bryk statement, Danneels part will get ignored. 29 00:01:57,850 --> 00:02:04,170 Hennesey while loops and spot runs if no break occurs and the condition is false. 30 00:02:04,480 --> 00:02:09,640 So whenever there is no public statement, whenever the condition is false, then only the part will 31 00:02:09,640 --> 00:02:15,330 get its control to execute its its respective code written under the else block. 32 00:02:15,820 --> 00:02:21,160 So let us go for one practical demonstration for the is the understanding of this while loop in python 33 00:02:21,160 --> 00:02:28,540 coding in this demonstration we are discussing the use of while loop in our python coding so that we 34 00:02:28,540 --> 00:02:34,390 have made Aisgill two three has been initialized with three while I is greater than Gittel Colon. 35 00:02:34,870 --> 00:02:39,780 So whenever you are giving colon then the next line will be coming with the indentation that wins. 36 00:02:39,790 --> 00:02:46,480 This line is within the while block printing the value of PI and also decreasing the value of PI by 37 00:02:46,480 --> 00:02:47,040 one hit. 38 00:02:47,410 --> 00:02:48,910 So let us go for the execution. 39 00:02:48,910 --> 00:02:54,890 You can find that three to one they are getting printed because when the value up I will become one. 40 00:02:54,910 --> 00:02:57,190 So one is that the condition is true. 41 00:02:57,190 --> 00:03:00,070 So print one is getting printed now. 42 00:03:00,070 --> 00:03:02,920 One is getting decreased by one, so it will become zero. 43 00:03:02,920 --> 00:03:05,920 So I will have the zero zero zero zero. 44 00:03:06,010 --> 00:03:07,150 The condition is false. 45 00:03:07,150 --> 00:03:09,940 So that is why it is coming out from the Y look. 46 00:03:10,480 --> 00:03:12,730 So let us go for a while else structure. 47 00:03:13,240 --> 00:03:19,150 So while I less than 10 print I and then I blast equal to one. 48 00:03:19,630 --> 00:03:25,180 That means when the value of I is not equal to ten below ten, that means when the eye is less than 49 00:03:25,180 --> 00:03:31,810 ten then the I will get printed and each and every time that I will be increased by one here and when 50 00:03:31,810 --> 00:03:36,330 this loop will get terminated then you are going to print that displayed successfully. 51 00:03:36,820 --> 00:03:38,320 So let us go for the execution. 52 00:03:38,320 --> 00:03:41,760 Say it for some just initializing decide with the values of five here. 53 00:03:42,400 --> 00:03:48,070 So now see the five is getting printed so five has got increased to six, six is less than ten, so 54 00:03:48,070 --> 00:03:49,060 six has got printed. 55 00:03:49,070 --> 00:03:51,310 Similarly seven, eight and nine has got printed. 56 00:03:51,880 --> 00:03:53,470 Nine has been increased by one. 57 00:03:53,470 --> 00:03:54,670 So it has become ten. 58 00:03:55,210 --> 00:03:56,670 So ten less than ten. 59 00:03:56,680 --> 00:04:02,020 The condition is also will be coming to the L spot and displayed successfully. 60 00:04:02,020 --> 00:04:03,670 The message is getting printed here. 61 00:04:04,330 --> 00:04:11,290 So in this we can find that how this respective while with LS structure is there, the blocks are getting 62 00:04:11,290 --> 00:04:13,650 printed accurately, are getting executed accordingly. 63 00:04:17,480 --> 00:04:19,230 Let us go for this pattern printing. 64 00:04:19,250 --> 00:04:24,750 These are the very common problems in our exams, so any will be taken from the keyboard as input. 65 00:04:24,770 --> 00:04:26,110 There is a number of players. 66 00:04:26,240 --> 00:04:31,490 If the number of player is equal to six, that means here will be having one, two, three, four, 67 00:04:31,490 --> 00:04:32,540 five, six or six. 68 00:04:32,540 --> 00:04:36,580 Number of players also can consider six is the number of here. 69 00:04:37,130 --> 00:04:42,410 So to print this particular pattern here will be having some blank characters and then some esoteric 70 00:04:42,410 --> 00:04:43,540 symbols will get printed. 71 00:04:43,940 --> 00:04:48,500 But if I write only the blank characters, it will be not easy for us to count that. 72 00:04:48,500 --> 00:04:49,910 How many blank characters are there? 73 00:04:49,910 --> 00:04:55,640 So in place of blank, we have written here got so in the coding also we can replace this door by blank 74 00:04:55,820 --> 00:04:57,920 if I want to get the final pattern here. 75 00:04:58,490 --> 00:05:00,560 So here you have made one dressing table. 76 00:05:00,800 --> 00:05:07,530 This is known as dressing table where we are trying to trace the logic of our code so far and the result 77 00:05:07,550 --> 00:05:09,100 is but the pattern to be printed. 78 00:05:09,410 --> 00:05:12,470 So I is a clear number or the height number. 79 00:05:12,500 --> 00:05:14,330 It is ranging from one to six. 80 00:05:14,490 --> 00:05:17,000 And here we are counting for each and every layer. 81 00:05:17,360 --> 00:05:23,210 We are counting the number of blanks and the number of starts in this particular dressing table. 82 00:05:23,630 --> 00:05:26,900 So here we are having five blank spaces and then one starts. 83 00:05:26,900 --> 00:05:31,330 We have written five and one here we are getting four blank spaces and then three starts. 84 00:05:31,520 --> 00:05:33,620 We have written this for entry here. 85 00:05:33,620 --> 00:05:36,830 We are getting no blank spaces, but here we are having eleven starts. 86 00:05:37,100 --> 00:05:42,560 So zero number of blank spaces and one number of starts or static symbols are going to get printed. 87 00:05:43,220 --> 00:05:48,360 So from here we are supposed to get the logic for blank logic, for the esoteric symbol. 88 00:05:48,620 --> 00:05:50,540 So what would be the logic for blank here? 89 00:05:51,080 --> 00:05:55,150 You can find that I is increasing at the blank is decreasing. 90 00:05:55,550 --> 00:06:00,230 So if you subtract this I from some fixed quantity, let it be in is equal to six. 91 00:06:00,470 --> 00:06:06,830 So if you subtract this I from the six then obviously when the I'll be increasing that difference value 92 00:06:06,830 --> 00:06:07,630 will be decreasing. 93 00:06:08,000 --> 00:06:13,010 So anybody who are finding some logic that is something is increasing and another one is decreasing, 94 00:06:13,280 --> 00:06:19,010 then obviously the value, the variable which is increasing should be subtracted from some fixed quantity 95 00:06:19,370 --> 00:06:23,110 so that when the variable will be increasing, that difference value will be decreasing. 96 00:06:23,540 --> 00:06:30,230 So that's why six minus one is five, six minus two is for six, minus three is six three and six, 97 00:06:30,230 --> 00:06:31,760 minus six is zero. 98 00:06:32,060 --> 00:06:35,840 So here the respective logic for the blank will be in minus eight. 99 00:06:36,970 --> 00:06:42,050 Next one is increasing by one study, is also increasing by two. 100 00:06:42,550 --> 00:06:49,780 So what we shall do if I is one start is a one I used to namaroff start will be three Isogawa five, 101 00:06:49,780 --> 00:06:51,210 number of studies nine. 102 00:06:51,520 --> 00:06:58,090 So we think that here the logic will be to start I minus one because doing two one two minus one is 103 00:06:58,090 --> 00:07:04,800 one, two into three is six, minus one is five to into six is twelve minus one is eleven here. 104 00:07:05,080 --> 00:07:08,980 So they hear the respective logic will be to start ie minus one. 105 00:07:10,210 --> 00:07:13,150 So we have got the logic now we are going to implement it here. 106 00:07:13,570 --> 00:07:20,510 So N is equal to in the input place and the number of players and then is equal to one report. 107 00:07:20,530 --> 00:07:25,690 And when that this value of EI is less than equal to end, that means I'll be ranging from one to six 108 00:07:25,930 --> 00:07:27,890 if the value up end is equal to six. 109 00:07:28,870 --> 00:07:32,650 So here we are, put that on everything in the while loop construct. 110 00:07:33,010 --> 00:07:38,170 So Jessica, we considering another control variable so will be equal to one. 111 00:07:38,470 --> 00:07:40,240 And while G is less than. 112 00:07:40,270 --> 00:07:45,520 So now what will happen for each and every player will be printing a certain number of blank characters 113 00:07:45,520 --> 00:07:47,680 and then certain number of asterisk symbols. 114 00:07:47,680 --> 00:07:49,410 Then you shall go for to continue to break. 115 00:07:49,690 --> 00:07:51,950 So that will be the skeleton of our program. 116 00:07:52,480 --> 00:07:57,010 So at first we're going to print some blank characters and then we're are going to bring some esoteric 117 00:07:57,010 --> 00:07:57,490 symbols. 118 00:07:57,820 --> 00:07:59,530 So how many blank characters we're having? 119 00:07:59,530 --> 00:08:02,590 We're having N minus a number of blank characters. 120 00:08:02,830 --> 00:08:07,260 So here we are putting this one as in minus one in minus eight. 121 00:08:07,780 --> 00:08:12,700 So basically one day less than equal to N minus I print here. 122 00:08:12,700 --> 00:08:19,870 We're printing this dot and end is equal to double double what means here we are just omitting the trailing 123 00:08:19,870 --> 00:08:23,380 new line characters so all these dots will get printed in the same line. 124 00:08:24,190 --> 00:08:26,200 So now again we are making this jiggle. 125 00:08:26,200 --> 00:08:28,490 The one and G is less than equal to. 126 00:08:28,510 --> 00:08:33,790 So here we are putting this start logic that is to start I minus one. 127 00:08:34,090 --> 00:08:39,790 So we are putting this logic here and then print start and continuity will be there. 128 00:08:40,030 --> 00:08:42,220 All the starts will get printed in the same row. 129 00:08:42,370 --> 00:08:45,070 So that's why it's difficult to double double code. 130 00:08:45,520 --> 00:08:47,860 So this is a print which will break the continuity. 131 00:08:47,860 --> 00:08:51,790 So we'll be printing certain number of dark, certain number of starts. 132 00:08:51,940 --> 00:08:54,190 So the next it'll be coming from the next line. 133 00:08:54,190 --> 00:08:59,110 So that's why to break the continuity here to uprooting and putting out of the print segment. 134 00:08:59,650 --> 00:09:01,350 So print function has been called here. 135 00:09:01,360 --> 00:09:03,040 So now let me go for the execution. 136 00:09:03,640 --> 00:09:07,480 We can find that if we give the value a six, I'm getting this pattern here. 137 00:09:07,570 --> 00:09:11,440 So I think so I should make this one to start at minus one. 138 00:09:12,040 --> 00:09:13,520 I should go for I increase. 139 00:09:13,520 --> 00:09:15,190 So that statement is missing. 140 00:09:15,190 --> 00:09:16,210 So let's go for this. 141 00:09:16,210 --> 00:09:16,930 I increase. 142 00:09:17,380 --> 00:09:19,870 So I is equal to eight plus one. 143 00:09:21,270 --> 00:09:23,430 So here this has to be increased by one. 144 00:09:23,580 --> 00:09:26,320 And also let us put the same in a while. 145 00:09:26,940 --> 00:09:28,590 So what we shall do is that. 146 00:09:30,740 --> 00:09:37,220 So Jay is equal to Jay plus one, so that statement is required, otherwise my program will fall in 147 00:09:37,220 --> 00:09:38,390 in an infinite loop. 148 00:09:39,120 --> 00:09:41,380 Jessica two plus one here. 149 00:09:42,680 --> 00:09:44,210 So let's go for the execution. 150 00:09:44,720 --> 00:09:48,610 So here you are, putting the value of an individual 060. 151 00:09:48,620 --> 00:09:49,640 You're getting this pattern. 152 00:09:50,650 --> 00:09:51,280 We're getting this. 153 00:09:51,940 --> 00:09:56,890 So now if you put a different value for in here, if we put the value of any element, we are getting 154 00:09:56,890 --> 00:09:59,200 the pattern like this, you can easily fill that. 155 00:09:59,200 --> 00:10:02,770 One, two, three, four, five, six, seven, eight, 11. 156 00:10:02,860 --> 00:10:07,020 So one, two, three, four, five, six, seven, eight, nine, 10, 11. 157 00:10:07,030 --> 00:10:07,310 Yes. 158 00:10:07,660 --> 00:10:13,070 So here we are getting this 11 number of layers and the pattern is getting printed accordingly. 159 00:10:13,510 --> 00:10:19,840 So after writing any code, you should test your code with the multiple different values for inputs. 160 00:10:20,470 --> 00:10:21,580 So let me check again. 161 00:10:21,580 --> 00:10:24,580 One, two, three, four, five, six, seven, eight, nine. 162 00:10:24,610 --> 00:10:29,860 Yes, we're having the nine layers, so each and every layer will be having this preceding dots and 163 00:10:29,860 --> 00:10:30,460 then start. 164 00:10:30,850 --> 00:10:34,840 So now in place of DOT, if you put a blank character, if you put a blank characters, and then the 165 00:10:34,840 --> 00:10:36,220 pattern will be looking like this. 166 00:10:37,770 --> 00:10:40,250 And the pattern will be looking like this in this way. 167 00:10:41,670 --> 00:10:48,840 OK, now let us go for another example, so I want to bring this pattern like this, so any eleven dollars 168 00:10:48,900 --> 00:10:50,510 a valuable and should be all here. 169 00:10:50,940 --> 00:10:52,730 So it is the middle point. 170 00:10:52,830 --> 00:10:54,260 I might be regretting it. 171 00:10:54,270 --> 00:10:56,310 So let us at first go for the pattern. 172 00:10:56,730 --> 00:10:58,450 So this is a pattern we are going to print. 173 00:10:58,950 --> 00:11:05,010 So in the precinct we have written items ranging from one to 11 because element has been given and it 174 00:11:05,190 --> 00:11:05,940 must be odd. 175 00:11:05,940 --> 00:11:11,940 Otherwise this pattern will not have the symmetry if we have the invisibility even number. 176 00:11:11,940 --> 00:11:14,360 So pattern will be will not be having the symmetry. 177 00:11:14,850 --> 00:11:21,180 So now we are counting the number of dark, the stars, you know, so similarly with whatever we did 178 00:11:21,180 --> 00:11:21,590 earlier. 179 00:11:21,600 --> 00:11:27,300 So just consider this rule arbitrarily so that having four dots and three starts, so have written that 180 00:11:27,300 --> 00:11:32,910 one has four dogs and three starts in this way, we filled up this DOT column and the star column. 181 00:11:33,480 --> 00:11:36,540 So now let's go for the logic derivation. 182 00:11:36,870 --> 00:11:39,170 You know that I is increasing throughout. 183 00:11:39,180 --> 00:11:41,070 It is ranging from one to 11. 184 00:11:41,460 --> 00:11:44,520 But here this is at first increasing, then it is decreasing. 185 00:11:44,520 --> 00:11:48,750 So I cannot expect that same formula will work for the world hubs. 186 00:11:49,000 --> 00:11:55,830 So that's why you are going for a separate formula, for this respective logic, for this dot printing 187 00:11:55,830 --> 00:11:59,160 in the first up and in the lower up separately. 188 00:11:59,430 --> 00:12:00,320 So how to do that? 189 00:12:00,540 --> 00:12:01,470 Let us go for the. 190 00:12:02,950 --> 00:12:03,820 Calculations here. 191 00:12:04,450 --> 00:12:07,780 So if it is one, then it is zero, if it is true, then it is one. 192 00:12:07,780 --> 00:12:09,220 If it is six, then it is five. 193 00:12:09,230 --> 00:12:11,500 So it would be a minus one. 194 00:12:12,380 --> 00:12:16,100 OK, now come to this point, if it is seven, it is four. 195 00:12:16,100 --> 00:12:17,810 If it is eight, it is three. 196 00:12:18,080 --> 00:12:19,550 If it is nine, it is two. 197 00:12:19,940 --> 00:12:26,900 So that means I should subtract this from the from some fixed quantity so that when the value up I will 198 00:12:26,900 --> 00:12:29,790 be increasing, the different value will be decreasing here. 199 00:12:30,230 --> 00:12:36,230 So here we are having this I n is equal to eleven so eleven minus seven for eleven minus eight. 200 00:12:36,230 --> 00:12:37,700 Three eleven minus ten. 201 00:12:37,700 --> 00:12:40,310 One eleven minus eleven is zero here. 202 00:12:40,610 --> 00:12:43,070 So here the logic will be in minus I. 203 00:12:44,420 --> 00:12:47,670 Next one is that for this particular individual relevant. 204 00:12:47,690 --> 00:12:50,860 My middle point is the middle, that is the sixth layer. 205 00:12:50,960 --> 00:12:52,810 So how to get six here. 206 00:12:53,180 --> 00:12:54,260 So that is very simple. 207 00:12:54,260 --> 00:12:57,560 Eleven plus one, twelve by two is equal to six. 208 00:12:57,860 --> 00:13:00,290 So that's why you are calculating another variable. 209 00:13:00,290 --> 00:13:06,380 So the variable is getting initialized with six when the value of N is eleven, M stands for the middle 210 00:13:06,770 --> 00:13:07,080 layer. 211 00:13:07,910 --> 00:13:12,280 So now let us go for the calculation, the logic derivation for this start. 212 00:13:12,770 --> 00:13:19,460 So this explosion's, whatever you are going to derive here can contain, I can contain N and also can 213 00:13:19,460 --> 00:13:20,660 contain M here. 214 00:13:21,290 --> 00:13:23,030 So let us go for this derivation. 215 00:13:23,450 --> 00:13:28,700 So here you can find that I is increasing by one and start is decreasing by two. 216 00:13:28,970 --> 00:13:34,130 So that means when the easier it must be subtracted from this fixed quantity so that different value 217 00:13:34,370 --> 00:13:37,220 will be decreasing when the value of I will be increasing. 218 00:13:37,760 --> 00:13:39,470 So let's go for the derivation. 219 00:13:39,480 --> 00:13:41,000 So what is the logic are finding. 220 00:13:41,180 --> 00:13:42,090 Just consider here. 221 00:13:42,800 --> 00:13:47,480 So six minus one there is a five five in the two 502. 222 00:13:47,480 --> 00:13:49,360 That is extent plus one that is eleven. 223 00:13:49,910 --> 00:13:51,830 So I'm going to give you two clues. 224 00:13:51,830 --> 00:13:57,230 Clue number one, when I is increasing, starting, decreasing, that means that I has to be subtracted 225 00:13:57,230 --> 00:14:01,790 from some fixed quantity so that when the value up I will be increasing the difference value will be 226 00:14:01,790 --> 00:14:02,300 decreasing. 227 00:14:02,630 --> 00:14:03,260 There is no point. 228 00:14:03,260 --> 00:14:03,770 Number one. 229 00:14:04,220 --> 00:14:10,790 Point number two here is that here you can find that I is increasing by one, but the start is decreasing 230 00:14:10,790 --> 00:14:11,270 by two. 231 00:14:11,270 --> 00:14:17,210 So that different value has to be multiplied by some by two so that that difference will get decreased 232 00:14:17,510 --> 00:14:19,240 the by the factor of two. 233 00:14:19,850 --> 00:14:30,020 So six minus one, five to ten plus one eleven six minus four is two into two four plus one five six 234 00:14:30,020 --> 00:14:33,690 minus six is zero two zero plus one one. 235 00:14:34,040 --> 00:14:40,040 So here the formula will be to start here, the formula will be to start in minus I plus one. 236 00:14:42,120 --> 00:14:46,530 Lost in this case, but having this one, there is this particular case. 237 00:14:46,860 --> 00:14:54,930 So if I use seven stories to three, I use eight stories five so we can see that it is increasing by 238 00:14:55,110 --> 00:14:55,560 one. 239 00:14:55,560 --> 00:14:57,980 It is also increasing, but increasing by two. 240 00:14:58,320 --> 00:15:00,990 So to multiplication factor will be there. 241 00:15:01,290 --> 00:15:02,550 So that is our clue. 242 00:15:03,360 --> 00:15:04,170 OK, now see. 243 00:15:05,520 --> 00:15:12,270 So seven minus six, one, two, two, one, two, plus one is three nine minus six, what is that, 244 00:15:12,270 --> 00:15:15,080 three in the two six plus one seven. 245 00:15:15,420 --> 00:15:18,720 So that's why here the logic will be to start to start. 246 00:15:18,720 --> 00:15:24,000 I might assume so to start at 8:00 a.m. So we are going to get here plus one. 247 00:15:25,080 --> 00:15:27,660 So we have got the logic now how to implement the same. 248 00:15:28,410 --> 00:15:33,180 So let me put this one here in the code I'm going to put here. 249 00:15:35,690 --> 00:15:36,890 I'm going to object in. 250 00:15:39,500 --> 00:15:45,630 So here you have got the logic now how to implement it, what we can do that after reading this valuable 251 00:15:45,650 --> 00:15:47,900 when we are calculating that middle muswell. 252 00:15:48,200 --> 00:15:49,110 So what does that mean? 253 00:15:49,130 --> 00:15:50,330 Plus one whole. 254 00:15:51,660 --> 00:15:57,120 OK, this entered the odd number of ballots, OK, next. 255 00:15:59,300 --> 00:16:07,040 If I get it, then Im not what is what is the meaning of bigger than perhaps a lower eye, greater than 256 00:16:07,040 --> 00:16:14,090 it means it is the lower half, so blank no blank will be equal to in the lower up in magnesite. 257 00:16:15,380 --> 00:16:16,590 We got this one from here. 258 00:16:17,300 --> 00:16:20,180 This one and four, they started having this formula. 259 00:16:21,030 --> 00:16:26,010 So that is our starter, so here's what I think is equal to this formula else. 260 00:16:28,770 --> 00:16:36,360 So we shall be going for this blank and blank is minus one, and the start will be equal to two minus 261 00:16:36,360 --> 00:16:39,810 I thought to start in minus eight, plus one. 262 00:16:42,930 --> 00:16:48,100 So if I get it, then there is a blank disaster or else there is a blank disaster. 263 00:16:48,360 --> 00:16:50,170 So in this way, I've got this logic. 264 00:16:50,820 --> 00:16:57,720 So now how many number of blanks will get printed, will get printed B number of and how many no upstarts 265 00:16:57,720 --> 00:16:59,340 will get printed its numbers. 266 00:17:00,420 --> 00:17:02,920 So in this way, I can easily implement my code. 267 00:17:03,900 --> 00:17:05,790 So let me go for the cross-check. 268 00:17:06,270 --> 00:17:10,310 If it is good, this code, I keep the value of it, then I'm getting this pattern. 269 00:17:11,130 --> 00:17:17,700 So here you see we are having this dressing table is that we are having and it's the respective implementation. 270 00:17:17,710 --> 00:17:20,810 You can easily find that how this code has got implemented. 271 00:17:21,150 --> 00:17:24,420 So if you give the value, say, 13, I'm getting the pattern like this. 272 00:17:24,540 --> 00:17:31,580 Let me count one, two, three, four, five, six, seven, eight, nine, 10, 11, 12, 13. 273 00:17:31,590 --> 00:17:34,890 Yes, we are getting this our total number of layers here. 274 00:17:35,040 --> 00:17:38,510 Obviously, layer number will be starting from one to 13 in this fashion. 275 00:17:39,300 --> 00:17:42,630 So let me go for another execution if I make this one a seven. 276 00:17:44,290 --> 00:17:45,790 We're getting this better like this. 277 00:17:46,320 --> 00:17:52,360 OK, so if a user gives if user gives the event value for this end, then what will happen? 278 00:17:52,720 --> 00:17:55,150 The pattern will not have the respect of symmetry here. 279 00:17:55,720 --> 00:18:01,450 Now, I'm going to give you one example, one practice example here who just which has to be solved 280 00:18:01,450 --> 00:18:02,510 by you. 281 00:18:03,190 --> 00:18:04,350 So these are practice work. 282 00:18:04,360 --> 00:18:07,780 We're having a program to display a pattern using loops. 283 00:18:07,900 --> 00:18:16,120 So here the pattern is given here the pattern is given and here also prepared this dressing table you 284 00:18:16,150 --> 00:18:23,260 want and here you are supposed to derive the logic and then that respective logic has to be implemented 285 00:18:23,260 --> 00:18:24,280 using python coding. 286 00:18:24,730 --> 00:18:30,160 So I'm giving this particular assignment as a practice work for your better understanding and for for 287 00:18:30,160 --> 00:18:31,840 your better performance. 288 00:18:32,260 --> 00:18:33,490 So please solve this problem. 289 00:18:33,490 --> 00:18:40,270 I've made the problem partially done in the planning phase are now implemented using the Python code 290 00:18:40,630 --> 00:18:42,840 and similar type of code already written. 291 00:18:43,090 --> 00:18:47,350 So you are supposed to check that one out from this example. 292 00:18:47,830 --> 00:18:53,500 So in this particular demonstration, we have discussed how to use a while loop in Python code. 293 00:18:54,040 --> 00:18:55,210 Thanks for watching this video.