1
00:00:02,170 --> 00:00:03,760
Hey, guys, what's up?

2
00:00:04,230 --> 00:00:10,050
So until now, we have only seen one kind of law that was Vilo.

3
00:00:10,480 --> 00:00:15,130
Now in this we do we will learn another type of flu called for love.

4
00:00:15,810 --> 00:00:16,960
OK, so what happened?

5
00:00:16,960 --> 00:00:17,700
ENVI Lupus.

6
00:00:18,190 --> 00:00:20,110
So this is your initialization.

7
00:00:23,230 --> 00:00:32,860
Then vilely and then this is my condition, then these are the instructions that I have to execute.

8
00:00:33,250 --> 00:00:35,980
And finally, this is my update.

9
00:00:37,030 --> 00:00:39,490
So this is a general vibe loop.

10
00:00:39,790 --> 00:00:44,440
Similarly, the full look will be forward initialization.

11
00:00:48,660 --> 00:00:50,790
Semicolon column condition.

12
00:00:53,630 --> 00:00:55,340
Sam McWilliam, update.

13
00:00:58,190 --> 00:00:58,450
OK.

14
00:00:58,970 --> 00:01:02,330
This is only the difference between for loop and by loop.

15
00:01:03,090 --> 00:01:03,360
OK.

16
00:01:03,620 --> 00:01:06,910
So here all the three things were at different places here.

17
00:01:06,950 --> 00:01:09,320
All the two things are the same places.

18
00:01:09,690 --> 00:01:12,200
Otherwise, the Viking of full loop and via loops.

19
00:01:12,320 --> 00:01:13,390
Exactly same.

20
00:01:13,960 --> 00:01:14,260
OK.

21
00:01:14,540 --> 00:01:17,460
So they're working off for loop and via loop is exactly same.

22
00:01:18,020 --> 00:01:19,970
Just this is only the difference.

23
00:01:21,320 --> 00:01:28,640
For example, if you so for example, if I want to print hello five times and via loop I will write

24
00:01:28,640 --> 00:01:29,450
something like.

25
00:01:29,930 --> 00:01:31,280
And I equals one.

26
00:01:32,990 --> 00:01:37,110
While ILADS then goes to five, I will see out.

27
00:01:38,750 --> 00:01:39,140
Hello.

28
00:01:41,000 --> 00:01:42,160
And I Pless place.

29
00:01:42,680 --> 00:01:50,500
Similarly for printing Dialo five times and for Loop I will write for initialization.

30
00:01:50,750 --> 00:01:51,700
And I equals one.

31
00:01:52,190 --> 00:01:54,710
Now the condition I left then goes to five.

32
00:01:54,770 --> 00:01:56,870
And now the update I plus.

33
00:01:56,900 --> 00:01:59,860
Plus and see out.

34
00:02:00,230 --> 00:02:00,590
Hello.

35
00:02:02,130 --> 00:02:02,380
Okay.

36
00:02:02,600 --> 00:02:05,900
So this is only the difference here.

37
00:02:05,930 --> 00:02:09,160
All that three things are at different places in four.

38
00:02:09,160 --> 00:02:09,400
Look.

39
00:02:09,500 --> 00:02:12,110
All the two things are at the same place.

40
00:02:12,590 --> 00:02:13,520
So how does four look.

41
00:02:13,520 --> 00:02:14,000
Will work.

42
00:02:14,240 --> 00:02:15,770
So initially I equals one.

43
00:02:16,100 --> 00:02:18,720
So initially I was when I will check the condition.

44
00:02:18,750 --> 00:02:21,120
Condition is to go inside the loop print.

45
00:02:21,150 --> 00:02:21,500
Hello.

46
00:02:21,890 --> 00:02:27,050
Then after this, when I will reach here, I will again come up and gives the value.

47
00:02:27,110 --> 00:02:29,870
So the value of I will become to check the condition.

48
00:02:29,870 --> 00:02:33,770
Condition is to go inside being telo again.

49
00:02:33,770 --> 00:02:34,370
Go up.

50
00:02:34,610 --> 00:02:35,720
Increase the value.

51
00:02:35,870 --> 00:02:37,190
So value will come three.

52
00:02:37,460 --> 00:02:38,900
Again, check the condition.

53
00:02:39,160 --> 00:02:40,730
Brent, hello again.

54
00:02:40,910 --> 00:02:42,940
Is the value of I will become four.

55
00:02:43,100 --> 00:02:44,260
Check the condition.

56
00:02:44,630 --> 00:02:45,620
Go inside.

57
00:02:45,890 --> 00:02:48,240
Do the work increment devalue.

58
00:02:48,590 --> 00:02:50,500
So I will become five and.

59
00:02:51,510 --> 00:02:52,910
And I will become five.

60
00:02:52,940 --> 00:02:53,960
Check the condition.

61
00:02:53,990 --> 00:02:54,890
Go inside.

62
00:02:55,110 --> 00:02:55,460
Brent.

63
00:02:55,490 --> 00:02:56,380
Hello again.

64
00:02:56,390 --> 00:02:57,080
Come up.

65
00:02:57,650 --> 00:02:58,700
Increase the value.

66
00:02:58,760 --> 00:03:00,410
Now I was six.

67
00:03:00,530 --> 00:03:02,060
The condition is false.

68
00:03:02,390 --> 00:03:03,590
So the condition is false.

69
00:03:03,650 --> 00:03:04,520
I will reach here.

70
00:03:05,140 --> 00:03:05,520
Okay.

71
00:03:05,600 --> 00:03:06,260
I will reach here.

72
00:03:06,290 --> 00:03:07,760
The condition is false.

73
00:03:08,390 --> 00:03:10,940
So what is the difference between while loop and for loop.

74
00:03:11,360 --> 00:03:13,220
So that difference is only this.

75
00:03:14,710 --> 00:03:17,500
All two things are at different places.

76
00:03:17,620 --> 00:03:23,170
And then for Loop, all the three things are at the same location.

77
00:03:24,050 --> 00:03:24,220
OK.

78
00:03:26,080 --> 00:03:28,510
Now, let's see an example.

79
00:03:30,970 --> 00:03:32,020
So, for example.

80
00:03:32,470 --> 00:03:41,020
So, okay, so let's name it for Loop, so for Loop, not CBB.

81
00:03:57,980 --> 00:04:04,900
OK, so now what we do is we will try and print hello five times and work with the help of for loop.

82
00:04:05,240 --> 00:04:09,410
So for initialization now the condition.

83
00:04:10,670 --> 00:04:12,560
And now we have to update.

84
00:04:12,620 --> 00:04:12,980
So I.

85
00:04:12,990 --> 00:04:13,640
Plus plus.

86
00:04:15,600 --> 00:04:18,330
Well we have to do we have to see out.

87
00:04:19,340 --> 00:04:19,730
Hello.

88
00:04:22,040 --> 00:04:26,790
OK, so I plus versus same as I equals a plus one.

89
00:04:28,490 --> 00:04:29,780
So later in our program.

90
00:04:32,800 --> 00:04:38,050
So is getting printed five times just we have to give the spaces.

91
00:04:39,220 --> 00:04:40,960
So now let's do it again.

92
00:04:43,400 --> 00:04:45,770
OK, so Halo is getting printed five times.

93
00:04:46,070 --> 00:04:50,110
So they're working off for Loop and they're working off via Loop is exactly same.

94
00:04:50,630 --> 00:04:52,670
This is only the difference here.

95
00:04:52,760 --> 00:04:58,670
All the three things I had the same location and in my loop, all the two things added, different location.

96
00:04:58,700 --> 00:05:01,610
Otherwise, there is no defense in the working principle.

97
00:05:02,480 --> 00:05:06,320
So what we will do now is I will solve your problems with the help of for loop.

98
00:05:06,380 --> 00:05:08,690
So you get a better understanding or for loop.

99
00:05:09,080 --> 00:05:09,330
OK.

100
00:05:10,040 --> 00:05:11,300
So that is all for this video.

101
00:05:11,360 --> 00:05:11,870
Thank you.
