Python Function Basics Tutorial
Python Function: A function is a block of code to perform a specified task. In this context, there is a function call and there is a function definition. When a function is calling then the function definition is executing. We can pass data known as parameters(arguments) into a function. At the time of function call whatever we take arguments, is known as actual arguments and at the time of function call, we take arguments is known as formal arguments. Here actual arguments equals to the formal arguments. A function can return a value as result. In python a function is defined by using def keyword. Example(without arguments): def show(): #function definition print('python means SILAN Technology') show() #function call output: python means SILAN Technology Example(with arguments) def area(base,height): #function definition a=...
Comments
Post a Comment