Rainbow Deals - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
3. Calling the full_name() function
Creating functions
If statements
Summary

Instruction

Now that we've defined our function, we can call it using the name and our arguments in parentheses.

For example, we can call our function like this:

full_name("Kevin", "Smith")

Here, "Kevin" is a string literal for the first argument (name), and "Smith" is a string literal for the second argument (lastname). This will return "KEVIN SMITH", as expected.

Remember: the advantage of writing a function is code reusability. We demonstrated an example of calling this function with two specific values. Passing in different values will give you different results, but the behavior will remain the same.

Exercise

Invoke the function full_name() with your own first and last name.