1
00:00:02,930 --> 00:00:04,670
Hello, guys, and welcome back to the goods.

2
00:00:05,180 --> 00:00:11,420
So in all our previous classes, we were drawing different shapes like Rectangle Diomande pilot program

3
00:00:11,720 --> 00:00:14,330
to show the steps that are involved in solving a problem.

4
00:00:15,080 --> 00:00:16,850
Basically, we were drawing flowcharts.

5
00:00:17,540 --> 00:00:19,790
But from now on, we will never draw flowchart.

6
00:00:20,530 --> 00:00:20,820
Why?

7
00:00:21,440 --> 00:00:23,720
Because today we are going to learn pseudocode.

8
00:00:27,410 --> 00:00:31,760
So before discussing pseudocode, I want you to answer me a very simple question.

9
00:00:32,420 --> 00:00:35,030
My question is, what is our ultimate aim?

10
00:00:35,660 --> 00:00:36,780
What do we want to achieve?

11
00:00:38,220 --> 00:00:42,160
So our ultimate aim is to somehow show the steps that we have followed.

12
00:00:42,180 --> 00:00:43,200
To solve the problem.

13
00:00:44,250 --> 00:00:48,510
And in all our previous classes, we were showing these steps with the help of flu shots.

14
00:00:48,930 --> 00:00:51,240
That is with the help of different shapes and arrows.

15
00:00:52,480 --> 00:00:56,710
But what sort of courses, if your aim is to just show the steps.

16
00:00:57,010 --> 00:01:00,400
Then you can simply write structured English, showing the steps.

17
00:01:01,220 --> 00:01:03,160
And there is no need of growing the friendships.

18
00:01:04,330 --> 00:01:05,050
Makes sense.

19
00:01:05,470 --> 00:01:08,260
OK, so let's compare with Jordan to look for side by side.

20
00:01:10,790 --> 00:01:13,770
Flowchart pseudocode.

21
00:01:23,440 --> 00:01:29,320
OK, so if MoD's is good, then took pity.

22
00:01:34,140 --> 00:01:35,320
If this condition is true.

23
00:01:37,450 --> 00:01:37,840
Bengt.

24
00:01:39,700 --> 00:01:40,140
Bus.

25
00:01:42,080 --> 00:01:47,090
And if this condition is false, then bent field.

26
00:01:54,350 --> 00:01:56,150
So what will be the corresponding so-called.

27
00:01:58,670 --> 00:02:09,920
If Max is a good identity, then bent pass bent feis.

28
00:02:12,410 --> 00:02:14,820
As Peñafiel.

29
00:02:18,970 --> 00:02:19,220
OK.

30
00:02:20,070 --> 00:02:25,110
So if Max is good, then 33, then Brent pass and Sprint fail.

31
00:02:26,070 --> 00:02:27,260
So they both are same.

32
00:02:28,320 --> 00:02:29,010
They both are him.

33
00:02:30,050 --> 00:02:32,730
OK, so let's see one more example.

34
00:02:41,040 --> 00:02:43,590
Suppose I want to print hello five times.

35
00:02:43,710 --> 00:02:44,460
What will I do?

36
00:02:44,610 --> 00:02:45,510
I will use a loop.

37
00:02:46,140 --> 00:02:47,520
So I equals one.

38
00:02:50,020 --> 00:02:52,840
Is I less than ordered close to five?

39
00:02:56,120 --> 00:02:58,850
If this condition is true, I will print hello.

40
00:03:03,940 --> 00:03:05,830
And I will increase the value if I buy one.

41
00:03:07,570 --> 00:03:09,010
So I equals a plus one.

42
00:03:10,240 --> 00:03:12,130
And then I will check the condition again.

43
00:03:15,480 --> 00:03:18,900
And if this condition is false, you can endure program.

44
00:03:20,720 --> 00:03:22,110
So the first part is initialise.

45
00:03:22,260 --> 00:03:23,960
The second part is to check the condition.

46
00:03:24,260 --> 00:03:25,730
Third parties to do some work.

47
00:03:25,760 --> 00:03:27,530
And the fourth, you can say, is update.

48
00:03:28,280 --> 00:03:29,950
Similarly, initialise.

49
00:03:30,380 --> 00:03:31,400
So I equals one.

50
00:03:32,780 --> 00:03:33,990
This is how the initialise.

51
00:03:34,180 --> 00:03:37,280
OK, so I equals one way.

52
00:03:39,130 --> 00:03:44,170
I is less than articles to five do what do I do?

53
00:03:44,230 --> 00:03:44,940
I will bring telo.

54
00:03:46,870 --> 00:03:51,980
Brent, hello, and increase the value if I buy one.

55
00:03:52,030 --> 00:03:54,190
So I equals a plus one.

56
00:03:57,470 --> 00:03:59,850
And at this point of time, my loop will break.

57
00:03:59,990 --> 00:04:02,930
And I have printed halophiles times so you can return.

58
00:04:04,610 --> 00:04:06,530
Return means you can end your program.

59
00:04:06,960 --> 00:04:09,110
So return a Seimas and.

60
00:04:11,160 --> 00:04:13,950
This is same as I was when.

61
00:04:14,760 --> 00:04:16,040
So this is my condition.

62
00:04:18,920 --> 00:04:20,090
And this is update.

63
00:04:22,250 --> 00:04:26,770
OK, so the border seem so you can see here.

64
00:04:26,820 --> 00:04:29,350
So the gold is much, much simpler than flowchart.

65
00:04:30,460 --> 00:04:32,680
There's no need of bring the friendships.

66
00:04:33,010 --> 00:04:35,140
You can simply raid structured English.

67
00:04:36,450 --> 00:04:41,370
So we all know how this is working, how this will print Halo five times.

68
00:04:42,960 --> 00:04:44,700
Now let's see how this will look.

69
00:04:45,030 --> 00:04:47,010
So initially I equals one, OK?

70
00:04:47,490 --> 00:04:51,030
Then it will check the condition is one less than goes to face.

71
00:04:51,060 --> 00:04:52,050
The condition is true.

72
00:04:52,200 --> 00:04:52,990
It will print halo.

73
00:04:53,190 --> 00:04:53,490
OK.

74
00:04:56,330 --> 00:04:58,100
And then you will increase the value if I buy one.

75
00:04:58,130 --> 00:05:00,210
So the new value of AI is two.

76
00:05:01,070 --> 00:05:02,960
And then you will check the condition again.

77
00:05:04,480 --> 00:05:05,880
Is to less than close to five.

78
00:05:05,920 --> 00:05:07,000
So the condition is true.

79
00:05:07,090 --> 00:05:14,800
You will bring Telo and then you will increase their live fire by went to the new vilify as tea and

80
00:05:14,800 --> 00:05:16,660
then you will check the condition again.

81
00:05:18,350 --> 00:05:19,960
Is three less than was to five?

82
00:05:19,990 --> 00:05:21,060
So the condition is true.

83
00:05:21,150 --> 00:05:21,690
Brent, hello.

84
00:05:24,000 --> 00:05:27,700
And then you will increase the value of five Bevan's the new value of I will become four.

85
00:05:28,920 --> 00:05:33,000
Then you will check the condition again is for less than Agosta five.

86
00:05:33,060 --> 00:05:33,990
So the condition is true.

87
00:05:33,990 --> 00:05:39,120
You will bring Telo and then you will increase the value if I buy one.

88
00:05:39,780 --> 00:05:41,610
So the new value of FI is five.

89
00:05:42,270 --> 00:05:45,030
Then you will check the condition again is five.

90
00:05:45,110 --> 00:05:46,830
Letter was to five for the condition is true.

91
00:05:46,830 --> 00:05:51,510
You will print hello and then you will increase the value of five beavan's to the new value of I will

92
00:05:51,510 --> 00:05:52,590
become six.

93
00:05:53,870 --> 00:05:55,610
And then he will check the condition again.

94
00:05:55,970 --> 00:06:00,770
So is a six less than close to five and six less than close to five?

95
00:06:00,830 --> 00:06:01,280
No.

96
00:06:02,420 --> 00:06:04,370
Then you will come out of this loop.

97
00:06:05,010 --> 00:06:05,840
So this is my loop.

98
00:06:06,350 --> 00:06:07,460
You will come out of this loop.

99
00:06:07,490 --> 00:06:10,370
You will reach here and here I ever done.

100
00:06:10,980 --> 00:06:11,850
So it means.

101
00:06:12,020 --> 00:06:12,790
And their program.

102
00:06:13,550 --> 00:06:14,780
So I will end the program.

103
00:06:15,050 --> 00:06:15,710
And hello.

104
00:06:15,720 --> 00:06:17,030
Sprinted five times.

105
00:06:17,390 --> 00:06:20,390
And similarly, this loop is running five times.

106
00:06:20,780 --> 00:06:22,550
And each time I am printing.

107
00:06:22,820 --> 00:06:23,300
Hello.

108
00:06:23,570 --> 00:06:24,260
So in total.

109
00:06:24,280 --> 00:06:24,550
Hello.

110
00:06:24,700 --> 00:06:26,090
We printed five times.

111
00:06:27,480 --> 00:06:29,460
Now we will be solving four problems.

112
00:06:29,550 --> 00:06:33,420
And this time we will be writing pseudocode and Stewart over bring flowchart.

113
00:06:36,980 --> 00:06:41,090
So problem one, probably one statement is.

114
00:06:42,800 --> 00:06:43,550
Given an.

115
00:06:47,370 --> 00:06:52,980
If it is prime are not.

116
00:06:56,810 --> 00:07:02,640
So if you remember, we have already covered this problem in our previous videos Maddin that we use

117
00:07:02,670 --> 00:07:05,130
and that lessons we have drawn the flowchart.

118
00:07:05,700 --> 00:07:07,920
But today we will be writing sort of code for the same.

119
00:07:10,030 --> 00:07:13,390
OK, so what was our logic to check whether a number is prime or not?

120
00:07:14,050 --> 00:07:15,520
So my logic was very simple.

121
00:07:16,090 --> 00:07:19,060
Starting from two till end, minus one.

122
00:07:21,070 --> 00:07:25,720
I will try to find just one single number that divides.

123
00:07:25,830 --> 00:07:34,060
And and if I may work to find just one single number that divides in between two to end minus one,

124
00:07:34,630 --> 00:07:40,000
then N is not prime otherwise and is prime.

125
00:07:40,660 --> 00:07:42,120
OK, so let's write pseudocode.

126
00:07:47,430 --> 00:07:48,200
Read an.

127
00:07:50,050 --> 00:07:51,880
I equals to.

128
00:07:53,390 --> 00:07:59,270
While I is less than or it goes to end minus one.

129
00:08:00,540 --> 00:08:00,950
Do.

130
00:08:02,850 --> 00:08:03,870
So what will I do here?

131
00:08:04,170 --> 00:08:06,190
I will try to divide the number by I.

132
00:08:06,900 --> 00:08:08,040
So if.

133
00:08:09,560 --> 00:08:12,200
And as the visible.

134
00:08:15,130 --> 00:08:16,150
By a.

135
00:08:18,020 --> 00:08:18,530
Then.

136
00:08:20,390 --> 00:08:21,600
My number is not prime.

137
00:08:22,250 --> 00:08:24,830
So I can bring here not prime.

138
00:08:30,060 --> 00:08:31,350
And we can end up with.

139
00:08:32,770 --> 00:08:33,330
Get done.

140
00:08:33,460 --> 00:08:34,790
They're done means end up with him.

141
00:08:37,840 --> 00:08:38,100
OK.

142
00:08:39,340 --> 00:08:40,740
Otherwise, what will I do?

143
00:08:40,830 --> 00:08:45,240
I will increase the value if I buy when I close I plus one.

144
00:08:46,730 --> 00:08:52,520
OK, so if the given number is not prime, then I will reach here and my program will be lower.

145
00:08:53,240 --> 00:09:00,740
But what if and this prime then this statement will not be executed and this loop will break and I will

146
00:09:00,740 --> 00:09:01,250
reach here.

147
00:09:01,640 --> 00:09:05,420
So if I reach here, the thing is very clear that and is prime.

148
00:09:05,690 --> 00:09:13,160
So I will print prime and then I will end my program.

149
00:09:13,490 --> 00:09:14,030
So written.

150
00:09:16,370 --> 00:09:19,370
OK, so let's see how it is working with the help of an example.

151
00:09:23,550 --> 00:09:25,110
Let's say, and equals food.

152
00:09:26,670 --> 00:09:27,180
So it did.

153
00:09:27,220 --> 00:09:32,460
And initially I equals two, so I equals to.

154
00:09:34,070 --> 00:09:37,210
And minus one is three then.

155
00:09:37,340 --> 00:09:40,010
Here you are checking is two less than I was two teens.

156
00:09:40,010 --> 00:09:41,120
So the condition is true.

157
00:09:42,460 --> 00:09:46,390
You will come inside the loop, then you will check is full.

158
00:09:46,420 --> 00:09:47,340
There is well by two.

159
00:09:47,860 --> 00:09:49,000
So the condition is true.

160
00:09:49,090 --> 00:09:50,380
You will print not prime.

161
00:09:51,190 --> 00:09:53,620
So I will print not prime.

162
00:09:56,010 --> 00:09:58,320
And then return street men will be executed.

163
00:09:58,590 --> 00:10:00,110
So they're done means and a program.

164
00:10:00,180 --> 00:10:06,090
So my program will end and my output is not prime for any equals four, which is under present.

165
00:10:06,240 --> 00:10:06,600
Correct.

166
00:10:07,640 --> 00:10:07,850
OK.

167
00:10:07,920 --> 00:10:09,300
So let's see one more example.

168
00:10:10,050 --> 00:10:11,640
Let's say the value of end is five.

169
00:10:12,570 --> 00:10:14,930
So did and I equals two.

170
00:10:15,210 --> 00:10:15,540
Okay.

171
00:10:15,870 --> 00:10:20,550
So I equals two and and minus one equals food.

172
00:10:21,690 --> 00:10:23,030
Then it will check the condition.

173
00:10:24,570 --> 00:10:26,930
As to lt goes to fall, the condition is true.

174
00:10:27,080 --> 00:10:27,800
You will come here.

175
00:10:28,880 --> 00:10:30,050
You will come inside the loop.

176
00:10:30,500 --> 00:10:33,140
Then you will check is five neuzil by two?

177
00:10:33,620 --> 00:10:33,980
No.

178
00:10:34,460 --> 00:10:37,760
So this statement will not be executed and you will reach here.

179
00:10:38,350 --> 00:10:40,610
Is there any fiber once the new value is.

180
00:10:41,810 --> 00:10:43,880
And then you will check the condition again.

181
00:10:46,290 --> 00:10:48,420
So Estill, less than or to forward.

182
00:10:48,540 --> 00:10:49,680
So the condition is true.

183
00:10:49,800 --> 00:10:52,740
You will come here is five Neuzil by three.

184
00:10:52,830 --> 00:10:53,180
No.

185
00:10:53,670 --> 00:10:54,660
The condition is false.

186
00:10:54,840 --> 00:11:00,420
This statement will not be executed and you will reach here and give them Radio five Beban to the new

187
00:11:00,420 --> 00:11:01,980
radio fi is for.

188
00:11:04,210 --> 00:11:10,100
Then you will check the condition again is for less than articles two, for the condition is true.

189
00:11:10,910 --> 00:11:12,180
You will come inside the loop.

190
00:11:12,620 --> 00:11:13,460
Then you will check.

191
00:11:14,360 --> 00:11:15,950
Is five divisible by four?

192
00:11:16,220 --> 00:11:16,580
No.

193
00:11:16,670 --> 00:11:18,470
So this statement will not be executed.

194
00:11:18,800 --> 00:11:20,330
You will increase the value if I buy one.

195
00:11:20,570 --> 00:11:22,390
So a new value if I is five.

196
00:11:23,990 --> 00:11:27,840
Then you will check again is five less than articles to four.

197
00:11:28,470 --> 00:11:30,510
So is five less than not to four?

198
00:11:30,660 --> 00:11:30,960
No.

199
00:11:31,560 --> 00:11:32,960
The condition is false.

200
00:11:33,390 --> 00:11:36,660
And this loop will be broken.

201
00:11:37,680 --> 00:11:38,620
We will break this loop.

202
00:11:39,090 --> 00:11:41,190
And then you will reach here.

203
00:11:41,570 --> 00:11:42,450
Print prime.

204
00:11:42,540 --> 00:11:42,840
OK.

205
00:11:43,020 --> 00:11:44,040
So I will print prime.

206
00:11:46,550 --> 00:11:49,290
And then redundantly then means Andu program.

207
00:11:49,760 --> 00:11:50,960
So my output is prime.

208
00:11:51,020 --> 00:11:52,310
Which is hundred percent correct.

209
00:11:52,340 --> 00:11:53,390
For unequals equals five.

210
00:11:53,960 --> 00:11:56,120
So in pseudocode, the instructions are executed.

211
00:11:56,210 --> 00:11:58,430
Line by line, from top to bottom.

212
00:11:59,700 --> 00:12:04,490
OK, so instructions are executed line by line, from top to bottom.

213
00:12:05,390 --> 00:12:07,190
So it does revise how this is working.

214
00:12:08,690 --> 00:12:10,580
Guess what it does surveys where they have done so.

215
00:12:10,580 --> 00:12:12,390
The problem statement was given in.

216
00:12:12,470 --> 00:12:14,810
We have to check whether it is prime or not.

217
00:12:16,180 --> 00:12:17,650
So our logic was very simple.

218
00:12:17,770 --> 00:12:20,440
Starting from two till and minus one.

219
00:12:20,830 --> 00:12:24,730
My aim is to just find one single number that divides and.

220
00:12:25,820 --> 00:12:29,810
If I'm able to find that number, then the number is not Brem.

221
00:12:29,870 --> 00:12:31,830
Otherwise the number is frame.

222
00:12:32,690 --> 00:12:37,440
So I read and I equals to 10.

223
00:12:38,330 --> 00:12:43,630
I is less than or equal to and minus one because we have to go deal and minus one.

224
00:12:43,670 --> 00:12:47,830
You can also right here I Listin and Mutassim.

225
00:12:48,310 --> 00:12:52,580
OK, so I left to N minus one or I left it in the boathouse him.

226
00:12:53,780 --> 00:12:55,760
So if this condition is true what will you do.

227
00:12:56,030 --> 00:12:58,490
You will try to divide the given number.

228
00:12:59,780 --> 00:13:05,270
By I and if I divides in the new will print, not prime.

229
00:13:05,450 --> 00:13:07,600
And you can return return means end of program.

230
00:13:08,180 --> 00:13:12,950
And if this condition is followed, then you will reach here and you will increase the value if I buy

231
00:13:12,950 --> 00:13:13,190
one.

232
00:13:13,970 --> 00:13:17,040
And then you will again come here again.

233
00:13:17,060 --> 00:13:18,680
Check the condition again.

234
00:13:18,680 --> 00:13:20,400
Check if anybody is ill by I.

235
00:13:21,050 --> 00:13:23,660
If this condition is true na prime return.

236
00:13:23,870 --> 00:13:26,420
If this condition is false and gives them a low if I buy one.

237
00:13:27,050 --> 00:13:28,440
So this will keep going on.

238
00:13:28,810 --> 00:13:29,050
Okay.

239
00:13:30,760 --> 00:13:37,360
And if I had each year, that means it it the statement has not been executed.

240
00:13:38,110 --> 00:13:40,260
That means given number is blank.

241
00:13:40,360 --> 00:13:44,080
So I will print crime and written letters and a program.

242
00:13:46,550 --> 00:13:48,620
OK, so let's solve problem number two.

243
00:13:52,830 --> 00:13:53,520
Problem to.

244
00:13:55,310 --> 00:13:55,940
Fined.

245
00:13:57,880 --> 00:13:58,830
Largest off.

246
00:13:59,890 --> 00:14:00,640
And numbers.

247
00:14:02,690 --> 00:14:07,150
If I remember carefully, we have covered this caution and flowcharts.

248
00:14:07,820 --> 00:14:08,900
So what was our logic?

249
00:14:09,290 --> 00:14:14,330
I told you for rating and numbers, I don't know, the value of an elephant will be given by user.

250
00:14:14,720 --> 00:14:16,940
So for rating and numbers, I need a loop.

251
00:14:17,780 --> 00:14:20,130
And each time this loop is earning, what will I do?

252
00:14:20,150 --> 00:14:24,890
I will do the number and I will compare this number with the largest.

253
00:14:25,370 --> 00:14:28,910
And if this number is good, then loudest I will upgrade the value of largest.

254
00:14:29,240 --> 00:14:31,820
And when this loop will end, I will print not just.

255
00:14:32,970 --> 00:14:34,070
OK, so let us.

256
00:14:34,180 --> 00:14:34,860
The so called.

257
00:14:38,110 --> 00:14:38,730
Read an.

258
00:14:42,090 --> 00:14:43,620
I was when.

259
00:14:44,920 --> 00:14:45,670
Largest.

260
00:14:47,580 --> 00:14:49,170
It was minus infinity.

261
00:14:50,670 --> 00:14:51,180
While.

262
00:14:53,340 --> 00:14:58,530
I is less than or equal to N because we have to read in numbers.

263
00:14:59,590 --> 00:15:01,810
So this loop must run and times.

264
00:15:02,650 --> 00:15:07,150
So while I had less than I was doing, I have to read a number, so read.

265
00:15:09,110 --> 00:15:09,500
No.

266
00:15:11,430 --> 00:15:12,990
Compare this number with largest.

267
00:15:13,230 --> 00:15:16,380
So if this number is good, largest.

268
00:15:18,930 --> 00:15:25,970
Then I read the value of largest, largest equals name.

269
00:15:30,070 --> 00:15:30,310
OK.

270
00:15:30,790 --> 00:15:32,680
And then you will increase the value of five by one.

271
00:15:32,740 --> 00:15:34,300
So I equals a plus one.

272
00:15:35,860 --> 00:15:39,430
And Vandersloot will and you will bend largest.

273
00:15:42,580 --> 00:15:43,360
Done, done.

274
00:15:46,420 --> 00:15:51,820
OK, so let us take one example to understand disorder called SUPPOSE.

275
00:15:52,030 --> 00:15:54,000
And it was three.

276
00:15:54,160 --> 00:15:59,410
And I will leave two numbers, three, seven and five.

277
00:16:00,190 --> 00:16:00,460
OK.

278
00:16:01,420 --> 00:16:05,830
So the first step I read and I equals one.

279
00:16:06,340 --> 00:16:08,170
So I equals one.

280
00:16:08,440 --> 00:16:10,150
Logistic equals minus infinity.

281
00:16:10,210 --> 00:16:11,950
OK, so largest.

282
00:16:13,330 --> 00:16:14,980
Equals minus infinity.

283
00:16:16,760 --> 00:16:18,390
Is one less than goes to three?

284
00:16:18,440 --> 00:16:19,610
So the condition is true.

285
00:16:19,670 --> 00:16:20,870
You will come inside the loop.

286
00:16:21,350 --> 00:16:22,280
Then you have to read.

287
00:16:22,460 --> 00:16:24,550
No, I will read three.

288
00:16:25,940 --> 00:16:28,130
Then you will compare tea with the largest.

289
00:16:29,660 --> 00:16:31,460
So is triggered then minus infinity.

290
00:16:31,520 --> 00:16:31,880
Yes.

291
00:16:32,000 --> 00:16:33,530
You will appreciate the value of largest.

292
00:16:33,990 --> 00:16:34,830
So largest.

293
00:16:35,180 --> 00:16:37,520
Equals three.

294
00:16:38,690 --> 00:16:40,560
Then you will increase the value of I buy one.

295
00:16:40,680 --> 00:16:42,110
So the new value of AI is.

296
00:16:44,050 --> 00:16:45,830
Two and then.

297
00:16:47,310 --> 00:16:48,580
They will check the condition again.

298
00:16:48,880 --> 00:16:50,740
So is too late and it goes to three.

299
00:16:50,800 --> 00:16:54,000
So the condition is again through, you will come inside the loop.

300
00:16:55,080 --> 00:16:55,680
Read, no.

301
00:16:55,890 --> 00:16:57,800
This time I will read seven.

302
00:16:58,870 --> 00:16:59,140
OK?

303
00:16:59,640 --> 00:17:02,340
And then you have to compare this number with the largest.

304
00:17:02,790 --> 00:17:04,500
So is it seven good then three.

305
00:17:04,800 --> 00:17:06,000
Yes, the condition is true.

306
00:17:06,240 --> 00:17:12,090
You know, the value of largest so largest equals the number that you have read.

307
00:17:12,240 --> 00:17:13,260
That is seven.

308
00:17:14,310 --> 00:17:18,750
And then you will increase the value of five by one to the new value if I is three.

309
00:17:20,780 --> 00:17:22,280
Then you will check the condition again.

310
00:17:23,810 --> 00:17:25,320
Is still less than one, two, three.

311
00:17:25,380 --> 00:17:26,390
So the condition is again.

312
00:17:27,080 --> 00:17:28,380
You will come inside the loop.

313
00:17:28,870 --> 00:17:29,460
Richard No.

314
00:17:29,850 --> 00:17:30,090
OK.

315
00:17:30,270 --> 00:17:32,070
So this time I will read five.

316
00:17:33,390 --> 00:17:37,920
Compare this number with largest, so is five Gurdon's seven.

317
00:17:38,970 --> 00:17:40,590
No, the condition is false.

318
00:17:41,340 --> 00:17:43,950
And this statement will not be executed.

319
00:17:44,340 --> 00:17:45,000
You will come here.

320
00:17:45,810 --> 00:17:48,870
You will likely come here and give the rally if I buy one.

321
00:17:48,890 --> 00:17:49,530
So then you rally.

322
00:17:49,530 --> 00:17:51,360
If I is fooled.

323
00:17:52,810 --> 00:17:54,920
Then you will check the condition again.

324
00:17:56,130 --> 00:17:57,390
So is for less than I was.

325
00:17:57,390 --> 00:18:00,780
Two three is for less than I was.

326
00:18:00,780 --> 00:18:01,260
Two, three.

327
00:18:01,530 --> 00:18:01,780
No.

328
00:18:01,980 --> 00:18:03,250
The condition is false.

329
00:18:03,720 --> 00:18:04,950
And this loop.

330
00:18:06,160 --> 00:18:06,730
We'll break.

331
00:18:06,820 --> 00:18:08,620
I will come outside of this loop.

332
00:18:08,710 --> 00:18:09,390
I will reach you.

333
00:18:10,000 --> 00:18:10,720
Brind largest.

334
00:18:10,810 --> 00:18:11,080
OK.

335
00:18:11,140 --> 00:18:12,880
So the largest is it goes to seven.

336
00:18:13,150 --> 00:18:16,240
So I will print seven and then return.

337
00:18:16,610 --> 00:18:16,930
That is.

338
00:18:16,990 --> 00:18:17,770
And a program.

339
00:18:18,640 --> 00:18:21,610
So my output is seven which is a hundred percent.

340
00:18:21,610 --> 00:18:22,060
Correct.

341
00:18:22,320 --> 00:18:23,440
Four and equals three.

342
00:18:23,560 --> 00:18:24,610
And the values are two.

343
00:18:24,610 --> 00:18:25,540
Seven five.

344
00:18:27,680 --> 00:18:29,690
OK, so let's revise what we have done.

345
00:18:30,150 --> 00:18:33,350
So the problem was I would define largest of any numbers.

346
00:18:34,070 --> 00:18:36,800
And I told you for reading and numbers, I need to loop.

347
00:18:38,070 --> 00:18:44,160
So this is my initial invasion and this is my condition and this is absolute.

348
00:18:45,740 --> 00:18:46,400
Condition.

349
00:18:49,570 --> 00:18:50,560
Initialization.

350
00:18:53,500 --> 00:18:54,640
And this is update.

351
00:18:57,320 --> 00:18:59,930
So with the help of these three.

352
00:19:01,250 --> 00:19:03,030
My loop will run and thanks.

353
00:19:03,830 --> 00:19:10,220
And each time this loop is ending, I am reading a number and I'm comparing this number with the largest.

354
00:19:11,000 --> 00:19:15,530
And if this number is good, the largest, then I'm updating the value of largest.

355
00:19:16,310 --> 00:19:16,820
Simple.

356
00:19:17,720 --> 00:19:21,320
And after we have read and numbers, this loop will break.

357
00:19:22,130 --> 00:19:25,080
We will come out of this loop and I will print now just.

358
00:19:25,280 --> 00:19:26,900
And then I will finish my program.

359
00:19:27,850 --> 00:19:28,340
Simple.
