Okay, so next up let's cover the optional arguments that have a default value.
And I think we can work in the same file so that we can also take a look at different examples at the
same time.
So for this example let's add another function.
And also let's call it greet with time.
So we're also going to greet a specific person by name.
But also we're going to have an optional time argument that will have a default value of day.
So we're going to be returning a string and saying good time.
So that can be a good day.
Good morning good evening.
Whatever.
So now let's um, call it without this optional argument.
So let's welcome Bob.
And in another call, let's maybe welcome Charlie, but this time saying good evening.
Let's also add a new line here everywhere.
So we have a clear output.
Okay.
Now let's run this function.
So we've got good day, Bob, as time has the default value of day.
And when we provide the argument, there it is.
Good evening.
Now also, the order of the arguments here is pretty important because you can't really have an optional
argument before a required one.
This wouldn't even make any sense, because if I would move the time as the first one, which would
be optional, then what's the point of having an optional argument before our required one?
This would produce really weird syntax, and if I try to call it right now, I've got a different error
saying that too few arguments were passed to greet with time, so one was passed in this example.
Yet we actually have to pass two arguments.
I might try with a comma here, but this is a syntax error.
So as you see, you can't really realistically have the argument that's optional before a required one.
And also it doesn't make any sense at all.
Right.