8.1 Introduction
A function is a part of a computer program where a number of programming statements is clubbed as a block. It can be called when desired. This enables a modular approach to programming tasks and has become very popular among programmers nowadays since modules can be edited with ease. Functions receive input parameters and return output
parameters
. When a function is being used, the function name is called along with values for input parameters. After execution, a set of output parameters is returned. Python functions can be defined at any place in ...