WEBVTT

00:01.440 --> 00:06.680
If you remember in the previous lecture, I told you in Python we have two kinds of functions.

00:06.680 --> 00:12.480
One of them is the function that already came with Python, and the other one is a function that you

00:12.520 --> 00:14.600
created in the previous lecture.

00:14.600 --> 00:23.360
We learn how to create a function, and now we are going to learn how to use or what are the function

00:23.360 --> 00:24.840
that comes with Python.

00:24.880 --> 00:27.280
Those are called built in function.

00:27.280 --> 00:29.520
That is here okay I created a new file.

00:30.440 --> 00:35.920
Or let's go ask ChatGPT what is a built in function.

00:35.960 --> 00:47.720
Okay here I have the ChatGPT extension and I am going to ask this built in built in function okay in

00:47.720 --> 00:50.880
Python and just hit enter.

00:52.320 --> 00:54.960
Let's see what is it going to give me.

00:57.400 --> 00:57.800
Okay.

00:57.840 --> 01:02.070
Python has many built in Function that provided useful functionality.

01:02.110 --> 01:07.590
Here are some some commonly used built in functions in Python okay.

01:07.630 --> 01:08.670
Print.

01:08.710 --> 01:11.310
Print is used to display output on the console.

01:11.510 --> 01:12.230
Wow.

01:12.270 --> 01:14.350
Of course it gives you an example.

01:14.430 --> 01:19.750
And also we have the Len function that will return the length of an object of course.

01:19.750 --> 01:22.310
And also we have example we have input function.

01:22.430 --> 01:22.870
Very good.

01:22.870 --> 01:25.230
We haven't learned anything about input function.

01:25.270 --> 01:25.830
Okay.

01:25.870 --> 01:26.550
We have integer.

01:26.550 --> 01:27.190
We have float.

01:27.190 --> 01:27.910
We have string.

01:27.950 --> 01:29.550
We learn those all here.

01:29.590 --> 01:30.510
Okay.

01:30.550 --> 01:31.750
And also we have type.

01:31.750 --> 01:32.590
We learn that okay.

01:32.590 --> 01:33.550
You know what is that.

01:33.830 --> 01:34.230
Okay.

01:34.950 --> 01:40.150
And we have some some some function will some some some number.

01:40.190 --> 01:41.030
Okay.

01:41.070 --> 01:47.150
See we have min max and we have the largest example is an example.

01:47.190 --> 01:47.910
Okay.

01:47.950 --> 01:51.830
Sort function ABC return the absolute value of a number.

01:52.070 --> 01:52.390
Okay.

01:52.430 --> 01:55.710
We have example for that as well okay.

01:56.430 --> 02:00.500
These are just a few examples of Python builds in function.

02:00.500 --> 02:07.500
There are many more functions available and you can also create your own function using def keyword.

02:07.540 --> 02:14.220
Okay, you know this one okay, because we already learned that from all this stuff that ChatGPT gives

02:14.220 --> 02:14.500
me.

02:15.180 --> 02:18.460
One of them is very important and that is the input function.

02:18.460 --> 02:19.380
Let's go and use this.

02:19.420 --> 02:19.980
Okay.

02:20.020 --> 02:21.300
What is input function?

02:21.340 --> 02:26.580
Input function will while you're using it it will ask the user to enter something.

02:26.620 --> 02:27.260
Okay.

02:27.300 --> 02:29.140
Now for example we have a name.

02:29.140 --> 02:32.940
It is equal to input okay.

02:32.940 --> 02:34.900
Here let's ask the user okay.

02:34.940 --> 02:36.300
What is your name.

02:38.340 --> 02:38.700
Okay.

02:38.740 --> 02:42.100
It will ask the user that what is your your name.

02:42.260 --> 02:45.300
And then it will open the console for the user.

02:45.300 --> 02:47.980
So user can enter their name okay.

02:48.020 --> 02:49.420
And name will be stored here.

02:49.420 --> 02:53.140
And then we can print a welcome message to the user.

02:53.140 --> 02:57.540
For example let's say Welcome.

02:58.340 --> 03:02.340
And then concatenate this with net.

03:03.060 --> 03:03.780
Save this.

03:03.940 --> 03:06.260
And now let's execute this okay.

03:06.780 --> 03:10.540
Python and built in function hit enter.

03:10.740 --> 03:16.940
It is asking what is your your name okay here just see the console or the terminal.

03:16.980 --> 03:20.860
I'm going to tell my name is name and hit enter.

03:20.900 --> 03:22.900
It's a welcome name okay.

03:23.260 --> 03:25.100
You can enter your own name again.

03:25.100 --> 03:27.420
Let's go this time with John.

03:28.380 --> 03:30.580
And it is telling me that.

03:30.620 --> 03:31.460
Welcome, John.

03:31.780 --> 03:32.260
Okay.

03:32.300 --> 03:35.020
That is how you can use a built in function.

03:35.020 --> 03:39.020
And you see that ChatGPT gives me a lot of examples here.

03:39.140 --> 03:44.620
And also okay, enter your name, float, blah blah blah.

03:45.700 --> 03:51.420
And also you can create a calculator with this input okay.

03:51.460 --> 03:57.370
For example asking the user to enter the first number, enter the second number and then can calculate

03:57.370 --> 03:58.050
those two number.

03:58.050 --> 04:02.770
For example, sum them, multiply them, or divide them by a number and then print the result.

04:02.770 --> 04:05.130
So you will be having a simple calculator.

04:05.490 --> 04:09.730
So thanks for watching and I will see you in the next lecture.

04:09.730 --> 04:17.370
But before seeing that, I have to show you how I installed this ChatGPT came here into this extension.

04:17.370 --> 04:19.410
Search for ChatGPT.

04:19.450 --> 04:26.890
Okay chat GPT and you see that this one okay.

04:26.890 --> 04:34.290
This is an extension, uh, over 295,000 people installed this.

04:34.290 --> 04:36.410
And you can also install this.

04:36.450 --> 04:37.170
It's very good.

04:37.170 --> 04:42.450
It is helping you a lot in any kind of problem that you face.

04:44.770 --> 04:45.610
Okay.

04:45.650 --> 04:53.130
That is how you can use from AI on learning your your things like Python.

04:53.170 --> 04:55.330
So let's go and see what is next.
