Functions

2 / 5

Functions become more powerful when they can accept input values called parameters. Parameters are specified inside the parentheses when defining the function. Multiple parameters are separated by commas. For example:

def greet(first_name, last_name):
    print(f"Hello, {first_name} {last_name}!")

When calling this function, you must provide the arguments:

greet("John", "Dorian")

This function call will produce "Hello, John Dorian!".

Function parameters

Create a function called introduce with two parameters name and age.

The function should write an introductory statement, such as:
Hello, my name is {name} and I am {age} years old.

Congratulations!

You passed the !

Welcome!

Would you like a guided tour on how to use Vibewise?

Your email has been verified!