Master AI & Build your First Coding Portfolio with SkillReactor | Sign Up Now

Lesson 4 - Functions

4.2 Function Parameters

Not all functions can operate without data. Nearly all functions in typical programming require some data to function properly. This data is known as parameters.

Let's update our greet() function with parameters:

def greet(name):
    print("Hello,", name)


In this example, the greet() function accepts a name as a parameter.