Hello, everyone.
Welcome here.
In this lecture you are going to learn a function
with default parameter value,
which is called like a value, which we can always
add inside the parameter value.
And also we can change the customer value by calling parameter value.
How it is possible. We will see here.
This is the very simple lecture.
So using keyword
greeting greet.
Yes, a small name is enough for making a function okay.
So open and in parenthesis
like column hitting
like print of
hello.
Simply I am writing simple statement by calling
this function greet is in a
so empty function I am calling, so I will get very easily this.
Hello.
Let us say quickly right click on the file.
Run the program process finished with the exit code zero
means it is a running the code without error.
All right.
So hello you.
We are seeing if I am added.
Anything here will get.
So what I need to do
now default keyword or the default parameter value.
How it is going to be added here.
So we know that we know that
if we want to print a name like name. Yes.
This parameter, how I can pass the value.
John I can pass.
And if I want to print, how would how would I print here?
Very simply, I can print this statement
like okay.
Hello.
Maybe putting like flower braces
or else name we can get the value.
Let's run this program. Hello, John.
We are getting this is an argument passing and all everything is equal.
So where is the default?
Now let us see the simple by making a comma.
Yeah. Comma message.
Yeah.
Message equal to message like a.
This is also one parameter.
This is also an one parameter.
And here I am writing welcome.
Note. Good morning.
And you can add anything here.
Good morning I'm added here.
So the one first parameter name I'm passing an argument.
The second parameter is message a default value I have given.
If I am not passing any argument to this, maybe like, prints
the default, this message and just run this.
See, there is a no error if I'm passing only one argument.
If I in earlier, you may observe that
two parameters means we have to pass the two parameters.
Two argument value here.
Whenever you are using a default information with this parameter,
you need not to pass. It is not mandatory.
So when I am calling
hai, it is a printing like hello, like hello John.
So message.
Also I can print here how it would be possible.
So making like double quotes.
Yeah.
Concatenation is to be done here. Yeah.
Plus with plus
with my cursor.
Yeah. Here
and MSD like a m S z. Yes.
Now it can be possible to print with the space
for the purpose I have used for this is the space.
So now run the program.
Hi John.
Good morning.
If need any comma and all the information you had here.
Okay. Hello, John.
Good morning.
So this John I am calling
if I am like a maid making Alice
see. Hello, Alice.
Good morning. You will see here. That's it.
Hello, Alice. Good morning.
Have you seen?
Very simple and easy.
So here, a default keyword message.
We are able to passing and like assign to a parameter.
And we are able to add sync by reading in the message of output.
Very useful for this session.
And also if you are having any like, any custom message in your mind.
Yes, it is possible to pass with the parameter
as an argument, like, how are you doing?
Great.
How are you doing?
Great.
are you doing great this way.
How do you not. How are you?
How do you go?
I'm doing great.
Okay, so I'm not an English professional,
so making some minor mistakes would be there.
So, Alice. Hello, Alice.
See the output of the functionality?
Hello, Alice.
And how do you doing?
Great.
So these two parameters, when I am required to call it
my custom parameter as an argument value.
Absolutely.
It is going to be assigning this message.
And we are getting like this dynamic parameter as well as the message. See?
Hello Alice. How are you doing? Great.
So this way, whenever
in a class object, this function
or it may be or may not be, you can apply this default parameters
and the default parameter value within your functionality.
I hope it's very clear and simple lecture.
So we'll jump to next lecture.
Thank you.