WEBVTT 00:00.270 --> 00:04.620 In this nation we would create a program that calculate the factor of a given number. 00:04.630 --> 00:11.310 So a lot of the people that don't know factorial or 5 is equal to 5 multiplied by four or deployed by 00:11.330 --> 00:14.970 50 today by two multiplied by one. 00:15.010 --> 00:19.580 In this issue of the 110 percent you have already never experienced out of Stanford. 00:19.590 --> 00:23.820 We need to create a follow up on the number one to the number n.. 00:24.000 --> 00:25.740 That is a given from a user. 00:25.740 --> 00:29.390 Again I want it to have a variable A That will save our current value. 00:29.460 --> 00:35.430 Again inside the follow up we really want to play the kind of the value a within number of the loop. 00:35.430 --> 00:40.280 For example if n is sequel to 5 we will find the factorial of five. 00:40.520 --> 00:50.160 So the lope will with something like that for x in it ain't want to see X end inside we will write something 00:50.310 --> 00:57.720 a sequel to a multiplied by X a classical mistake here from our programmer who is not really developing 00:57.720 --> 00:59.270 the gory way of thinking. 00:59.410 --> 01:05.230 It's escapism based the logic from previous problem is to initialize a sequel to zero. 01:05.370 --> 01:13.740 If you do that we will have something like a quoters year old multiplied by one then a sequel to zero 01:13.740 --> 01:15.970 multiplied by two and so on. 01:15.980 --> 01:21.850 With that being said you'll need to take that and these effects is to initialize a equal to one. 01:21.990 --> 01:27.030 With that away I want to pause you one more time to see a good programmer say you need to think in every 01:27.030 --> 01:28.080 step of the way. 01:28.080 --> 01:33.130 It's not just copy and base different programs in order to just get the wall done. 01:33.210 --> 01:35.230 Let's say I did develop the actual code first. 01:35.280 --> 01:41.290 Again we will initialize that end so and a sequel to the in import of no. 01:41.310 --> 01:48.210 Then we need to initialize a sequel to 1 into 4 x in there ain't one tool. 01:48.240 --> 01:54.930 Again it is very important to have in the data here because N is a character in We need to transform 01:55.020 --> 01:59.880 n in diameter into blue as one because again we have the mind as one. 01:59.880 --> 02:02.350 In the end of the forall in dont get a column. 02:02.400 --> 02:08.490 Last but not least a sequel to a multiplied by X as we are a dimension in the that. 02:08.490 --> 02:10.840 Finally we will be putting this out. 02:11.020 --> 02:16.660 We will use the number 5 and the result is correct to one hundred and twenty.