1
00:00:01,620 --> 00:00:08,610
So those in this room are going to talk about this troops first we we'll discuss how to paint one 200

2
00:00:08,610 --> 00:00:09,080
numbers.

3
00:00:09,660 --> 00:00:14,760
So you're going to see point one and then bring it to.

4
00:00:20,970 --> 00:00:27,760
And so you need to type of 200, so this is very, very time consuming and it's a waste.

5
00:00:28,230 --> 00:00:34,380
So what you can do is you can look over this one 200 numbers using these groups.

6
00:00:34,560 --> 00:00:40,990
So Frostrup, I'm going to say, is for the Syntaxes for Iterator.

7
00:00:41,010 --> 00:00:47,200
You need to specify one element that will loop over from one to hundred numbers in the first loop.

8
00:00:47,220 --> 00:00:49,040
It will take the value of a statement.

9
00:00:49,050 --> 00:00:56,340
And the second thing to like the very second and third element and so on, we need to sit in instance

10
00:00:56,340 --> 00:00:57,560
for membership operator.

11
00:00:57,930 --> 00:01:04,120
And what we want to do is we want to switch with the range of zero to 100.

12
00:01:05,430 --> 00:01:14,010
So what I'm going to do is I will create a range of numbers and I will say for I in this range, it

13
00:01:14,010 --> 00:01:22,500
means that you can move forward this range of numbers each time, one at a time, if you want to.

14
00:01:22,770 --> 00:01:26,930
You want to put the Koran and then you can see there is an indentation.

15
00:01:27,240 --> 00:01:35,700
So for the loops, you need to follow this into the general space or with the further intention is for

16
00:01:35,700 --> 00:01:37,940
spaces or one tab space.

17
00:01:38,910 --> 00:01:41,150
So you need to separate it.

18
00:01:42,180 --> 00:01:46,400
So here's what it's going to do for in 200 hundred.

19
00:01:46,740 --> 00:01:54,870
It's going to execute these many times until I ranges from zero to ninety nine because this is at Kuzu.

20
00:01:55,170 --> 00:01:57,450
So I just sell one, not one.

21
00:01:58,710 --> 00:02:06,890
So it will first create the numbers from zero to hundred and then I will look for from first I will

22
00:02:07,320 --> 00:02:13,380
I use going to take value of zero and then execute this statement that is inside this.

23
00:02:14,310 --> 00:02:17,600
So we have to specify the current and we are given the tapestries.

24
00:02:17,910 --> 00:02:23,840
If you did not go to space, I mean the four internation, you'll get an error.

25
00:02:24,930 --> 00:02:27,090
So this print statement comes under this.

26
00:02:28,080 --> 00:02:33,990
So at the first iteration I take the very zero and execute this code, which is print of it.

27
00:02:34,530 --> 00:02:36,230
So zero will be printed.

28
00:02:36,420 --> 00:02:42,690
And in the second iteration it takes the value one and it gives this print of which is one.

29
00:02:43,050 --> 00:02:49,020
In the same way it will loops over one hundred and that one, not one, it will exceed this function

30
00:02:49,020 --> 00:02:50,040
does not get executed.

31
00:02:50,400 --> 00:02:53,340
So let's run this program and see what it does.

32
00:02:58,580 --> 00:03:05,920
And as you can see, we have a printed one, two hundred numbers, so I hope you have understood this

33
00:03:06,130 --> 00:03:06,590
group.

34
00:03:07,100 --> 00:03:12,970
So we just sing for I encourage you to come out, not one.

35
00:03:13,400 --> 00:03:15,350
This rain specifies the numbers.

36
00:03:15,470 --> 00:03:20,480
And each time we out of a group is good, execute the eye is going to be incremental.

37
00:03:21,710 --> 00:03:28,880
So now that's a sample, let's say a few numbers called.

38
00:03:31,860 --> 00:03:33,150
And few strings.

39
00:03:46,600 --> 00:03:48,710
So these are the elements of this.

40
00:03:49,930 --> 00:03:57,160
So how you can report these realities, you can just delete this range and you want to search for iiNet.

41
00:03:57,550 --> 00:04:05,020
So now I take the element of zero to sixty seven and it's going to be Prenter and then six nine eight

42
00:04:05,020 --> 00:04:05,190
nine.

43
00:04:05,620 --> 00:04:11,890
And then these things for each time of this iteration, these groups will get executed.

44
00:04:12,250 --> 00:04:13,480
So let me bring this.

45
00:04:16,660 --> 00:04:24,190
So as you can see, uh, situation and know the contents of this list, another way you can rupee's

46
00:04:24,790 --> 00:04:36,050
you can specify the range range of this stuff you need to specify cover, rent offer.

47
00:04:36,400 --> 00:04:38,950
So the offer is one, two, three, four, five, six.

48
00:04:39,310 --> 00:04:42,310
So six from zero to Lentol six.

49
00:04:42,320 --> 00:04:46,240
That means this range reduces the values zero.

50
00:04:46,240 --> 00:04:47,770
One, two, three, four, five.

51
00:04:48,220 --> 00:04:56,260
So these are the six elements and you can just sit and love it because it takes the value indexes.

52
00:04:56,650 --> 00:04:59,050
So you to say I love it.

53
00:04:59,050 --> 00:05:03,560
If you did not say I, it was just one, two, three, four, five numbers.

54
00:05:07,350 --> 00:05:16,830
So, ah, so we need to warn we need to bring these elements of this list of I so if you bring this

55
00:05:18,370 --> 00:05:20,810
up, look at the elements of this report.

56
00:05:21,270 --> 00:05:27,230
So this is the best way to treat all the or that alleged in a previous way.

57
00:05:27,240 --> 00:05:28,700
That is Farinelli.

58
00:05:28,710 --> 00:05:34,740
It's not that much helpful because it's either to point to this six old element.

59
00:05:35,010 --> 00:05:37,800
So you cannot do some calculations if you want to.

60
00:05:38,850 --> 00:05:40,420
If I pointed to the territory bit.

61
00:05:40,470 --> 00:05:48,000
So we need you to make it pointing to that nexus of these elements of this list, and then we we can

62
00:05:48,000 --> 00:05:48,780
just cut it off.

63
00:05:49,530 --> 00:05:51,300
So this is the one Farrukh.

64
00:05:51,660 --> 00:05:55,000
And next to one is I'm going to go this way.

65
00:05:56,970 --> 00:06:01,920
So the syntaxes while condition while.

66
00:06:03,840 --> 00:06:04,320
True.

67
00:06:05,300 --> 00:06:10,110
So let's let's take an example here is equal to zero.

68
00:06:11,100 --> 00:06:21,930
So this looks indexes while condition and then as you can see, for who to enter a condition automatically

69
00:06:21,930 --> 00:06:22,290
happen.

70
00:06:22,290 --> 00:06:23,770
And the first piece has been added.

71
00:06:24,030 --> 00:06:29,640
So you need to go the gap for spaces after this work addition to include the statements under the wire

72
00:06:29,680 --> 00:06:29,960
loop.

73
00:06:30,390 --> 00:06:37,290
So while condition and this condition should be true and why this condition is being to to these statements.

74
00:06:38,710 --> 00:06:45,890
But interfer, so this condition, Litsa, here less than relevant.

75
00:06:46,810 --> 00:06:51,790
So what you're being is Don Lemon, we are going to print very of you.

76
00:06:52,000 --> 00:06:53,500
So let's go and run this.

77
00:06:55,900 --> 00:07:02,870
So as you can see, there are infinite number of jurors because the value of you is not changing here.

78
00:07:03,340 --> 00:07:03,850
So.

79
00:07:06,840 --> 00:07:08,340
It has been struck.

80
00:07:16,660 --> 00:07:17,260
All right.

81
00:07:24,100 --> 00:07:27,490
OK, I will say, no, I really.

82
00:07:31,680 --> 00:07:32,790
All right now.

83
00:07:35,850 --> 00:07:39,040
That's of introducing somebody.

84
00:07:39,570 --> 00:07:41,490
All right, now I'm going to show you here.

85
00:07:41,670 --> 00:07:42,180
I don't know.

86
00:07:42,180 --> 00:07:42,820
It's.

87
00:07:46,820 --> 00:07:52,520
All right, now I'm going to show you here, so we are not going to change the values of here, that's

88
00:07:52,520 --> 00:07:57,860
why it's this condition is forever true, because you don't even know.

89
00:07:57,860 --> 00:08:01,270
What I'm going to do is I want to say this is equal to one.

90
00:08:01,640 --> 00:08:04,250
So I'm no incrementing yavor.

91
00:08:08,290 --> 00:08:11,380
So now it will print from zero to 10.

92
00:08:11,860 --> 00:08:12,850
Let me run this.

93
00:08:17,560 --> 00:08:24,120
So now if I run this one, you'll get the output of zero to 10.

94
00:08:25,390 --> 00:08:32,710
So because you're using truanting and it is close to this statement, that's a digital print often.

95
00:08:33,760 --> 00:08:37,870
And then you press one which changes the value from 10 to 11.

96
00:08:38,440 --> 00:08:44,250
And the way it is done is goes to level, which is fast because level is equal to the run rate.

97
00:08:44,530 --> 00:08:47,980
That's what, uh, this function gets exited.

98
00:08:49,240 --> 00:09:00,600
So this is a wide loop and I'm going to do this and let's say it is equal to and B is equal to fight.

99
00:09:00,940 --> 00:09:02,060
Now, another loop.

100
00:09:02,110 --> 00:09:03,640
We are going to see if.

101
00:09:04,450 --> 00:09:11,890
So if we need to set conditions, if we agree, then B, then need to put the current and then we need

102
00:09:11,890 --> 00:09:13,150
to write some statements.

103
00:09:13,330 --> 00:09:19,400
So if you it, then we want to perform some task so you can perform this task here.

104
00:09:19,690 --> 00:09:23,680
Let's say we are going to print is greater than.

105
00:09:30,090 --> 00:09:36,390
So if you agree to them, we are going to print this and let's go ahead and run this.

106
00:09:39,530 --> 00:09:52,820
Frequency is greater than be, so we can also put a list cross to say that print is less than.

107
00:09:59,100 --> 00:10:02,310
So if you go ahead and on this episode, this one.

108
00:10:06,490 --> 00:10:12,370
And run this one, so it is bigger than admitting the value of here to pre.

109
00:10:16,300 --> 00:10:22,910
So now you're saying it is less than week, so now the situation is what if you have more than two conditions?

110
00:10:23,230 --> 00:10:25,090
So here we are taking on two conditions.

111
00:10:25,360 --> 00:10:28,380
Weather is greater than we ought to be.

112
00:10:29,050 --> 00:10:32,170
So you can see it if.

113
00:10:34,540 --> 00:10:43,510
Is it easy to beat so this equals two will compare the actual value of here and B, if both are equal,

114
00:10:43,510 --> 00:10:46,070
then only this statement gets ridiculous.

115
00:10:47,950 --> 00:10:51,490
No, I want to say here is equal to.

116
00:10:54,090 --> 00:11:01,920
And you can also put another ayliffe, um, yeah, as then be.

117
00:11:03,800 --> 00:11:04,340
It's a.

118
00:11:11,990 --> 00:11:13,780
Finally, you can put the earth's crust.

119
00:11:20,490 --> 00:11:25,790
So here's what we're going to do is we are going to check one condition here is that rather than be

120
00:11:26,070 --> 00:11:30,290
if that condition is true, then it will print this article.

121
00:11:30,310 --> 00:11:38,410
This print statement is going to be and if it is if this condition fails, then we check this one is

122
00:11:39,060 --> 00:11:41,940
to then this statement gets decrypted.

123
00:11:42,210 --> 00:11:46,930
And even if their condition fails, then it will come to this statement condition.

124
00:11:46,950 --> 00:11:47,240
Yes.

125
00:11:47,250 --> 00:11:54,090
Then if that is true, then it would get this statement that executer and if these three conditions

126
00:11:54,090 --> 00:12:00,680
first, then this will get executables elss other than our conditions, accept this trip.

127
00:12:01,530 --> 00:12:10,710
So now let me put it to fight until this group and run our program will get Aztecas to be because this

128
00:12:10,710 --> 00:12:19,310
condition has been satisfied as to and this treatment has been executer our to is equal to minus one.

129
00:12:19,920 --> 00:12:22,800
So minus one Allosaurus or less than five.

130
00:12:27,100 --> 00:12:36,240
OK, just we are not going to in this nothing, so just this one year, less than a three.

131
00:12:36,770 --> 00:12:37,660
It will not nothing.

132
00:12:40,400 --> 00:12:47,300
So as you can see, so these are the basic groups you're going to encounter in normal Python programming,

133
00:12:47,660 --> 00:12:54,820
and we also develop some tools in the section in this course, only in particular section.

134
00:12:55,250 --> 00:13:01,370
So in that section will be using the lot of loops for loops and etc..

135
00:13:02,210 --> 00:13:07,760
So I hope we have understood, even though this section sounds confusing in the practice section or

136
00:13:07,760 --> 00:13:11,030
in the developing two section, you will get so much comfortable.

