1 00:00:00,630 --> 00:00:07,590 While loop repeatedly executes good which is inside the loop while Pacific condition remains valid. 2 00:00:07,590 --> 00:00:09,880 Composition of while loop is as follows. 3 00:00:10,380 --> 00:00:17,880 While the condition is to do something firstly we decree a valuable function as a loop current variable 4 00:00:18,090 --> 00:00:25,030 counter the condition in which the Y statement will even reads the value of the counter to this you 5 00:00:25,050 --> 00:00:31,280 mean something more than or less then so the loop would be executed. 6 00:00:31,290 --> 00:00:36,860 Example variable count equals three white counter more than zero. 7 00:00:36,880 --> 00:00:47,490 Column print of in parentheses between two double quotes equal sine variable count variable count equal 8 00:00:47,490 --> 00:00:50,970 variable count minus one variable. 9 00:00:51,030 --> 00:00:57,220 We will get variable count equals the variable count equal to variable count equal 1. 10 00:00:57,360 --> 00:01:06,560 Continue using continue in while we use continue to skip a specific step in iteration process of Y. 11 00:01:06,710 --> 00:01:11,940 Example not equal city why num more than zero. 12 00:01:12,000 --> 00:01:26,830 Column num minus equal 1 if num equal 1 column continue print Current to no column and non valid reasons 13 00:01:27,200 --> 00:01:35,870 current number 0 current Number 2 zip iterator exemplars print of in parenthesis list of in parentheses 14 00:01:36,700 --> 00:01:40,510 zip 0 in parenthesis of in square brackets. 15 00:01:40,550 --> 00:01:49,790 Red yellow green cross square brackets comma public square brackets 1 and 2 and 3 close but into this 16 00:01:49,790 --> 00:02:01,460 close parenthesis close but we will get red and one yellow and 2 Green and 3 which is less of 3 tuples 17 00:02:01,910 --> 00:02:10,900 so many chewable colors equal red yellow green numbers equal 1 2 3 4 color and the name in the colors 18 00:02:10,960 --> 00:02:17,800 of in parenthesis colors and the numbers close parentheses column brand of embarrasses between two double 19 00:02:17,810 --> 00:02:24,290 quotes of income brackets close get a record column of in color bracket close call records look for 20 00:02:24,290 --> 00:02:25,940 me in parentheses. 21 00:02:25,970 --> 00:02:35,480 Colors and num close parentheses close the second apprentices we will get read between two single codes 22 00:02:36,020 --> 00:02:44,870 column 1 yellow between two thing equals call them to green between two single codes column three zip 23 00:02:45,360 --> 00:02:56,690 method iterator plus store examples for list is unzip nested lists symbol numbers three colors equal 24 00:02:56,780 --> 00:03:06,020 open square brackets red yellow green growth square brackets names equal up in square brackets one two 25 00:03:06,020 --> 00:03:15,920 three blue square brackets colors list hoping colors and numbers of in square brackets colors and the 26 00:03:15,920 --> 00:03:25,970 number scrawled square brackets four colors and the numbers in zip up in parenthesis store colors underscore 27 00:03:25,980 --> 00:03:36,650 list global entities column print colors and the numbers we will get red one yellow two green three 28 00:03:39,230 --> 00:03:48,950 enumerate function iterator for lists it returns and iterator of tuples containing indices and values 29 00:03:49,010 --> 00:03:50,080 of a list. 30 00:03:50,090 --> 00:03:58,700 Use this whole new want the index along with each element of an interval and allow letters equal up 31 00:03:58,720 --> 00:04:08,290 in square brackets A and B and C and D and E CLOSE AT square brackets for index and letter and enumerate 32 00:04:08,300 --> 00:04:23,730 letters column Brent index and letter 0 a 1 b to c 3 The for e enumerate method Rachel for tuples examine 33 00:04:23,730 --> 00:04:34,770 two letters equal of invariant is A and B and C and D and E close parentheses for index and letter and 34 00:04:34,770 --> 00:04:43,990 enumerate letters column print index and letters 0 a 1 b to c 3 for E. 35 00:04:44,010 --> 00:04:53,430 We will try our lines of code in job return not one variable count equals while variable count more 36 00:04:53,430 --> 00:04:54,450 than zero. 37 00:04:54,690 --> 00:04:59,060 Column variable count equal variable count minus 1. 38 00:04:59,130 --> 00:05:09,710 Print variable count equal and variable count value we will get variable count equal to 1 0 num equals 39 00:05:09,710 --> 00:05:12,350 3 while num more than zero. 40 00:05:12,430 --> 00:05:19,730 Column num minus 1 if num equal 1 Continue. 41 00:05:20,100 --> 00:05:23,840 It will print kind of number to count the number 0 42 00:05:27,920 --> 00:05:35,390 print up in parentheses list of member entities zip up in parentheses open square brackets red yellow 43 00:05:35,390 --> 00:05:43,430 green plus square brackets comma open square brackets 1 2 3 close parenthesis close but entities close 44 00:05:43,460 --> 00:05:46,960 parenthesis shift enter. 45 00:05:47,270 --> 00:05:54,680 We will get red 1 yellow 2 Greens free at 3 tables inside 1 list 46 00:05:57,460 --> 00:06:08,470 colors equal up in square parentheses red yellow green num equal 1 2 3 4 color and the NUM in zip colour 47 00:06:08,530 --> 00:06:17,860 underarms print open parentheses colors equals red yellow green numbers equal one two three. 48 00:06:17,950 --> 00:06:29,230 So it's two lists we use for the side zealousness for the two lists for color and name and Z color and 49 00:06:29,450 --> 00:06:29,910 colors. 50 00:06:29,920 --> 00:06:33,580 And the name Brent dot for me Kyra. 51 00:06:33,810 --> 00:06:46,400 And the name we will get red one yellow to green three colors red yellow green numbers 1 2 3 colors 52 00:06:46,410 --> 00:06:54,700 less equal colors and the numbers for colors and the names and zip in parentheses a star colors underscore 53 00:06:54,710 --> 00:07:03,340 list colors parentheses long print colors and the numbers we will get red one yellow to green city where 54 00:07:03,350 --> 00:07:12,620 we use the same code for tuples as we use this good for letters we will use it also for tube's colors 55 00:07:13,100 --> 00:07:23,180 of in parentheses and the yellow and green numbers one two three colors lists colors and drums for colors 56 00:07:23,210 --> 00:07:34,230 and drums and zip of a Baretta this star colors underscore let us close parentheses column Brent colors 57 00:07:34,350 --> 00:07:48,370 and the names we will get red one yellow to green three letters equal a b c d e for i and the letters 58 00:07:48,690 --> 00:07:51,030 for index and letter and enumerate 59 00:07:54,020 --> 00:07:55,820 it as is letters below. 60 00:07:55,830 --> 00:08:11,530 Brent as this column Brent ended the letter we will get zero A one B to C C D for e for the same code 61 00:08:11,800 --> 00:08:25,410 but not for less D for tubas we will get 0 a 1 b to c 3GS for E so that symbolism for 2. 62 00:08:25,510 --> 00:08:27,360 Thank you for watching. 63 00:08:27,370 --> 00:08:29,650 Hope you enjoyed this lecture. 64 00:08:29,650 --> 00:08:31,000 See you next lecture.