Defining a Function with parameters and arguments

Parameters can specify after function name and inside the parenthesis. You can specify multiple parameters in parenthesis by separating with comma.

An argument is an information or data passed to the python function.
The data can be passed from the function caller using the functions parameters.

In the below example, calculate() is a python function with one parameter i.e. num.

Example:

def calculate(num):
    print(Square of the number:” + num ** num)
calculate(4) 	# calling a function with argument 4.
calculate(10)	# calling a function with argument 10.


Related Tutorials