WEBVTT 00:01.230 --> 00:06.770 We have already created some basic programs that can find the maximum number and calculate it out of 00:06.770 --> 00:08.120 a quadratic equation. 00:08.160 --> 00:13.320 But what if you want to say loud and clear Dan how good is that can calculate the maximum number of 00:13.380 --> 00:14.430 ten thousand numbers. 00:14.470 --> 00:19.120 I sure you realize that it is not obscene to create 10000 statements. 00:19.260 --> 00:23.050 However if you take I mean think about the code that was created. 00:23.070 --> 00:26.770 You can observe a pattern in this particular case of three variables. 00:26.820 --> 00:29.300 So we need to leave statements with that in mind. 00:29.310 --> 00:35.020 If you ever their numbers we will need nine if statement if not it was done every single number may 00:35.030 --> 00:37.320 a desire to create something that be repeatedly. 00:37.330 --> 00:41.530 Does this same thing over and over again for different numbers. 00:41.550 --> 00:47.200 The significant difference between the computer and a human being is that when you give uneasy in a 00:47.200 --> 00:52.190 boring desktop computer you can actually perform it really quickly without ever complaining. 00:52.200 --> 00:58.440 For example start counting from 1 to 1000 and then create a computer program that can do the same exact 00:58.440 --> 01:01.540 dasc the output will be things that we think are audible speed. 01:01.560 --> 01:04.010 And of course without ever complaining. 01:04.200 --> 01:10.020 So I think that now you can see how necessary ending do we do that the structure is in how we can help 01:10.020 --> 01:11.230 you improve your programs. 01:11.310 --> 01:14.700 Let us all that you want to count from zero to 10 in this case. 01:14.710 --> 01:18.090 You'll unite for X in that ain't pseudo comma. 01:18.160 --> 01:23.430 Then in this way the computer will be repeat the fallen block inside the four lobe then that was in 01:23.430 --> 01:27.330 David a dime for X will a to values first x issue 0. 01:27.360 --> 01:32.100 Then x is equal to 1 and so on and so forth and did execute equal to 9. 01:32.110 --> 01:37.140 The problem is that in this way your will count from 0 to 9 in order to figure it out. 01:37.140 --> 01:39.970 You can try it rained 0 comma 11. 01:42.720 --> 01:45.130 Of course year the program is very lazy. 01:45.360 --> 01:48.450 We will it just does the command line that we learn in theory. 01:48.450 --> 01:57.980 Solve for x in her ain't Zero carmike 11 and you never do one of the loops we want to bring things out. 01:58.000 --> 02:00.560 So print x. 02:01.170 --> 02:03.380 Of course again we forget the column. 02:05.350 --> 02:12.400 As you can see here we go zero while and tools hurry and alter the numbers until 10. 02:12.400 --> 02:18.350 Now if we write here at 10 we will have the numbers zero to 9. 02:18.370 --> 02:21.620 Sure is everybody to think that this is this standard a number. 02:21.780 --> 02:24.650 To This is the entered number minus one.