If you remember in the previous lecture, I told you in Python we have two kinds of functions.
One of them is the function that already came with Python, and the other one is a function that you
created in the previous lecture.
We learn how to create a function, and now we are going to learn how to use or what are the function
that comes with Python.
Those are called built in function.
That is here okay I created a new file.
Or let's go ask ChatGPT what is a built in function.
Okay here I have the ChatGPT extension and I am going to ask this built in built in function okay in
Python and just hit enter.
Let's see what is it going to give me.
Okay.
Python has many built in Function that provided useful functionality.
Here are some some commonly used built in functions in Python okay.
Print.
Print is used to display output on the console.
Wow.
Of course it gives you an example.
And also we have the Len function that will return the length of an object of course.
And also we have example we have input function.
Very good.
We haven't learned anything about input function.
Okay.
We have integer.
We have float.
We have string.
We learn those all here.
Okay.
And also we have type.
We learn that okay.
You know what is that.
Okay.
And we have some some some function will some some some number.
Okay.
See we have min max and we have the largest example is an example.
Okay.
Sort function ABC return the absolute value of a number.
Okay.
We have example for that as well okay.
These are just a few examples of Python builds in function.
There are many more functions available and you can also create your own function using def keyword.
Okay, you know this one okay, because we already learned that from all this stuff that ChatGPT gives
me.
One of them is very important and that is the input function.
Let's go and use this.
Okay.
What is input function?
Input function will while you're using it it will ask the user to enter something.
Okay.
Now for example we have a name.
It is equal to input okay.
Here let's ask the user okay.
What is your name.
Okay.
It will ask the user that what is your your name.
And then it will open the console for the user.
So user can enter their name okay.
And name will be stored here.
And then we can print a welcome message to the user.
For example let's say Welcome.
And then concatenate this with net.
Save this.
And now let's execute this okay.
Python and built in function hit enter.
It is asking what is your your name okay here just see the console or the terminal.
I'm going to tell my name is name and hit enter.
It's a welcome name okay.
You can enter your own name again.
Let's go this time with John.
And it is telling me that.
Welcome, John.
Okay.
That is how you can use a built in function.
And you see that ChatGPT gives me a lot of examples here.
And also okay, enter your name, float, blah blah blah.
And also you can create a calculator with this input okay.
For example asking the user to enter the first number, enter the second number and then can calculate
those two number.
For example, sum them, multiply them, or divide them by a number and then print the result.
So you will be having a simple calculator.
So thanks for watching and I will see you in the next lecture.
But before seeing that, I have to show you how I installed this ChatGPT came here into this extension.
Search for ChatGPT.
Okay chat GPT and you see that this one okay.
This is an extension, uh, over 295,000 people installed this.
And you can also install this.
It's very good.
It is helping you a lot in any kind of problem that you face.
Okay.
That is how you can use from AI on learning your your things like Python.
So let's go and see what is next.