WEBVTT 00:00.480 --> 00:01.150 Hey guys. 00:01.160 --> 00:06.160 Come back when you lecture in this lecture we are going to talk about building functions and building 00:06.160 --> 00:07.180 models. 00:07.230 --> 00:12.840 So as you know as a programmer you are not going to write each and every call each and everything by 00:12.840 --> 00:13.830 yourself. 00:13.830 --> 00:19.160 There are some things that are printed in functionalities that has already been done. 00:19.230 --> 00:25.200 That means most of the things that you are able to do from day to day life from day to day programming 00:25.350 --> 00:28.670 small things so you don't have to write your code in real time. 00:28.680 --> 00:34.220 There are some things that are already being done and they are done in the home or functions. 00:34.260 --> 00:39.960 So a function is something that if there is a code that is used again and again that can be used again 00:39.960 --> 00:47.470 in future and it has to be C since writing that code every time what you can do is you can see discord 00:47.500 --> 00:52.770 and not a function and all I can do is just call that function whenever you want to use it. 00:52.930 --> 00:57.240 So instead of writing the code again you just need to call that particular function. 00:57.390 --> 00:58.910 So there are two function. 00:58.920 --> 01:00.440 One is building function. 01:00.540 --> 01:08.070 So the day to day activity that included Python basics are already totally dependent on building functions. 01:08.070 --> 01:11.910 So there are python readers who have done that and do use these function. 01:11.910 --> 01:16.980 All you have to do is just try the function name and the second one is user defined function. 01:17.100 --> 01:23.220 So the function that we write in our code while scripting while reading algorithms while programming 01:23.400 --> 01:26.150 or doing anything when developing an application. 01:26.250 --> 01:29.670 So there are some functions that are going to reuse many times. 01:29.670 --> 01:35.610 So we call them user defined function so that we are going to go up and function when you will be creating 01:35.610 --> 01:36.870 our own function. 01:37.050 --> 01:40.580 At this point of time we dont assign building function. 01:40.630 --> 01:43.510 So you already know this from the blueprint statement. 01:43.680 --> 01:49.830 So this spring statement help us reprint things that we are able to do as I do mine so argument is something 01:49.830 --> 01:52.310 that I'm going to get this particular function. 01:52.470 --> 01:59.770 So whenever I call a function I need to give it something that something is I may say if I print now. 01:59.910 --> 02:03.180 Now we are only talking about print as a function. 02:03.210 --> 02:08.160 There are different type of function that we are ordered to of all we have all the whole input so that 02:08.160 --> 02:13.180 number crunching is really useful to get stuff and store it into a variable. 02:13.290 --> 02:16.430 We are on the road in flew by casting. 02:16.590 --> 02:22.230 So these type of functions are really useful but there are a lot more functions and how to get them 02:22.660 --> 02:28.770 to understand all the different types of functions that are available on lockless worldwide to and argue 02:28.770 --> 02:33.390 ID that is the official website of Python on one two blocks ahead. 02:33.440 --> 02:35.750 You going to the person that you are using. 02:35.910 --> 02:42.900 We are currently using the latest one that is 3.7 by 1 and currently to the point it is in devlopment 02:42.900 --> 02:43.470 phase. 02:43.740 --> 02:50.130 And once you select your version just click on to library reference you can select building functions. 02:50.130 --> 02:54.920 Now you can get all the list of functions I want any definition if you want. 02:54.930 --> 02:58.240 In the example just click on that particular function. 02:58.410 --> 03:04.980 So if I need to use any function if I need to give or try to can all I have to do is click on that particular 03:05.000 --> 03:05.850 function. 03:05.940 --> 03:07.640 So I played on Max. 03:07.650 --> 03:13.650 Now if I need more this function you will be able to understand its functionality that is what it is 03:13.650 --> 03:14.600 going to do. 03:14.820 --> 03:17.760 So I just tried and if I call the max function. 03:17.760 --> 03:23.550 It will hit on the largest item that are available in the argument will be performing that. 03:23.540 --> 03:29.070 But what if I don't want to mess with this particular apps I show you what you can always just tried 03:29.190 --> 03:36.720 Datatrieve that is the I open that indices that underscore and underscore right. 03:36.930 --> 03:41.350 And and then doubles and the school and then bandages. 03:41.520 --> 03:45.490 And if you click on that you'll get the list of all the functions. 03:45.540 --> 03:52.270 It is easy for you to sign on Python website and you can also do that on by cell. 03:52.330 --> 03:58.620 Now if I want to give a try to max that is Max and head I need to buy some arguments. 03:58.620 --> 04:04.140 Let me give arguments as high as 65 in something like that. 04:04.320 --> 04:09.830 And I click and Dunsany the highest value that is 90 in this particular case. 04:10.080 --> 04:16.140 And if I were to check more in functions I can use that I might use flint to check out the length of 04:16.140 --> 04:23.880 available or millionth of an object I might use some print that you already know I can use for that 04:23.880 --> 04:25.880 is b w this function. 04:25.880 --> 04:26.790 Help us to do. 04:26.820 --> 04:31.970 Like if I need to refer to the power of 10 I can just fast then. 04:32.160 --> 04:39.580 So if I just try out the OR function that is pop and if I pass two and then you will get the result 04:39.860 --> 04:43.720 is 1 0 2 4 that is to the power of 10. 04:43.740 --> 04:49.670 So these are built in function and they are really really critical and they are all stored in our interpreter. 04:49.980 --> 04:56.190 But what if there are some functionalities that are only available on net and we can just download them 04:56.190 --> 04:58.210 in use or there are some more rules. 04:58.230 --> 05:05.520 If you want to use some more news or basically big bunch of more and more functions are a big bunch 05:05.520 --> 05:08.570 of that have their own functionalities. 05:08.610 --> 05:13.050 So if I install a model the model can have their own 20:30 functions. 05:13.050 --> 05:16.300 So to have them on your own you are close important. 05:16.440 --> 05:24.240 So there is already one model which is known as Matt and if I want to add it into our code into a program 05:24.410 --> 05:26.510 or I have two uses. 05:26.850 --> 05:30.300 And then the modem name since its name is math. 05:30.300 --> 05:31.810 I can use that map. 05:31.950 --> 05:35.530 And now this particular model is added into all. 05:35.640 --> 05:42.000 And if I were to go home something that really did more do with its functionality I can do that. 05:42.360 --> 05:45.910 So let me clear this out and start with model of map. 05:45.960 --> 05:54.720 So on the screen I just need to map which is already into my system not use this more on your largest 05:54.720 --> 05:58.700 map and then door and none can use its functions. 05:58.740 --> 06:01.350 So there are different functions that are available. 06:01.380 --> 06:07.410 You can see here and there is some sign function that is some square function than function or function 06:07.410 --> 06:08.440 power function. 06:08.580 --> 06:15.760 So I will try to use a skew our function to rescue Arbys Square to see if I give a value of 5 here. 06:15.780 --> 06:18.070 And you can see Albertus flat roof of five. 06:18.190 --> 06:21.750 And if you want to store this in a variable I can do that. 06:21.840 --> 06:23.760 I can use some variable name 06:26.710 --> 06:32.850 and then all of this particular Mordieu and then door then call home chimichurri what I want. 06:32.950 --> 06:34.910 You can get that list here. 06:35.270 --> 06:40.570 I just need to ask you are the and then Baso of value. 06:40.580 --> 06:45.110 Or maybe I just scored 16 for print here. 06:45.570 --> 06:50.190 Variable You can see I go the value superdense the value added. 06:50.440 --> 06:51.370 I never. 06:51.440 --> 06:56.720 All the functions that are available in this model all I can do is call my pray. 06:57.010 --> 06:59.150 And also my wedding. 06:59.370 --> 07:01.350 And you can see all the names. 07:01.350 --> 07:05.310 That is all the functions name that I included in this Magu. 07:05.370 --> 07:07.790 So Mordieu and functions are really important. 07:07.890 --> 07:11.880 Then they will move into more dual function like resections. 07:11.940 --> 07:13.460 You'll get to know a lot more. 07:13.480 --> 07:18.200 And I just wonder if I'm not going to stand as you would want to use. 07:18.270 --> 07:23.570 You can call their functions you can get functions of value and you can get a result. 07:23.790 --> 07:26.880 I hope this lecture was helpful in the next lecture. 07:26.880 --> 07:29.040 Let us do some more stoppit bite on.