While loop repeatedly executes good which is inside the loop while Pacific condition remains valid.
Composition of while loop is as follows.
While the condition is to do something firstly we decree a valuable function as a loop current variable
counter the condition in which the Y statement will even reads the value of the counter to this you
mean something more than or less then so the loop would be executed.
Example variable count equals three white counter more than zero.
Column print of in parentheses between two double quotes equal sine variable count variable count equal
variable count minus one variable.
We will get variable count equals the variable count equal to variable count equal 1.
Continue using continue in while we use continue to skip a specific step in iteration process of Y.
Example not equal city why num more than zero.
Column num minus equal 1 if num equal 1 column continue print Current to no column and non valid reasons
current number 0 current Number 2 zip iterator exemplars print of in parenthesis list of in parentheses
zip 0 in parenthesis of in square brackets.
Red yellow green cross square brackets comma public square brackets 1 and 2 and 3 close but into this
close parenthesis close but we will get red and one yellow and 2 Green and 3 which is less of 3 tuples
so many chewable colors equal red yellow green numbers equal 1 2 3 4 color and the name in the colors
of in parenthesis colors and the numbers close parentheses column brand of embarrasses between two double
quotes of income brackets close get a record column of in color bracket close call records look for
me in parentheses.
Colors and num close parentheses close the second apprentices we will get read between two single codes
column 1 yellow between two thing equals call them to green between two single codes column three zip
method iterator plus store examples for list is unzip nested lists symbol numbers three colors equal
open square brackets red yellow green growth square brackets names equal up in square brackets one two
three blue square brackets colors list hoping colors and numbers of in square brackets colors and the
number scrawled square brackets four colors and the numbers in zip up in parenthesis store colors underscore
list global entities column print colors and the numbers we will get red one yellow two green three
enumerate function iterator for lists it returns and iterator of tuples containing indices and values
of a list.
Use this whole new want the index along with each element of an interval and allow letters equal up
in square brackets A and B and C and D and E CLOSE AT square brackets for index and letter and enumerate
letters column Brent index and letter 0 a 1 b to c 3 The for e enumerate method Rachel for tuples examine
two letters equal of invariant is A and B and C and D and E close parentheses for index and letter and
enumerate letters column print index and letters 0 a 1 b to c 3 for E.
We will try our lines of code in job return not one variable count equals while variable count more
than zero.
Column variable count equal variable count minus 1.
Print variable count equal and variable count value we will get variable count equal to 1 0 num equals
3 while num more than zero.
Column num minus 1 if num equal 1 Continue.
It will print kind of number to count the number 0
print up in parentheses list of member entities zip up in parentheses open square brackets red yellow
green plus square brackets comma open square brackets 1 2 3 close parenthesis close but entities close
parenthesis shift enter.
We will get red 1 yellow 2 Greens free at 3 tables inside 1 list
colors equal up in square parentheses red yellow green num equal 1 2 3 4 color and the NUM in zip colour
underarms print open parentheses colors equals red yellow green numbers equal one two three.
So it's two lists we use for the side zealousness for the two lists for color and name and Z color and
colors.
And the name Brent dot for me Kyra.
And the name we will get red one yellow to green three colors red yellow green numbers 1 2 3 colors
less equal colors and the numbers for colors and the names and zip in parentheses a star colors underscore
list colors parentheses long print colors and the numbers we will get red one yellow to green city where
we use the same code for tuples as we use this good for letters we will use it also for tube's colors
of in parentheses and the yellow and green numbers one two three colors lists colors and drums for colors
and drums and zip of a Baretta this star colors underscore let us close parentheses column Brent colors
and the names we will get red one yellow to green three letters equal a b c d e for i and the letters
for index and letter and enumerate
it as is letters below.
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
but not for less D for tubas we will get 0 a 1 b to c 3GS for E so that symbolism for 2.
Thank you for watching.
Hope you enjoyed this lecture.
See you next lecture.