Google News
logo
Python Program to Function Parameters
In the following example of Python program that demonstrates the use of function parameters :
Program :
def greet(name):
    print("Hello, " + name + "!")

greet("Alice")
greet("Bob")
Output :
Hello, Alice!
Hello, Bob!
In the above example, we define a function `greet` that takes a single parameter `name`. When the function is called, it will print a greeting message that includes the value of the `name` parameter.

We then call the `greet` function twice, passing different values for the `name` parameter each time. This results in the function printing out two different greeting messages, one for "Alice" and one for "Bob".