Functions1 Introduction
Functions1 Introduction
The example of type2 given above illustrate that there are three
Functions(1,2,3,) having there own self contained block of statements
performing different functionalities.
Divide and conquer approach means that a problem is divided into various
sub problem(as seen in type 2), solutions of various sub problems can be
integrated to form the solution of original problem.
6. There are many functions and each of the functions has been categorized in
three groups.
Types are:
a. Built-in
These are the predefined functions and are always available for use.
For e.g., len(),type(),int(),input() etc.
b. Modules
These functions are predefined in a particular modules and can only be
used when that module is imported.
For e.g., Maths function(like sin(),cos() etc.) can only be used when we
import math module in our code.
c. User defined
These are defined by programs. In order to create these category of
functions programmer can decide the name of their choice (considering
naming rule of identifier) for the function and functionality of function
are decided by the programmer.