Function Parameters
1. Introduction
A function parameter (also called a formal parameter) is a variable listed in a function’s declaration or definition that receives a value when the function is called. The value passed during the call is known as an argument (or actual parameter).
Parameters allow functions to operate on different data each time they are invoked, making code reusable and modular. They define the interface between the caller and the function: the caller provides arguments, and the function uses its parameters to process them.
Parameter vs. Argument
A parameter is the variable in the function signature; an argument is the concrete value passed by the caller.
Example – In def add(a, b): ... and add(3, 5), a and b are parameters, while 3 and 5 are arguments.