Math Function

Math Function:
Python has a math module that provides most of the familiar mathematical functions. A module is a file that contains a collection of related functions.
importing math function

>>>import math
this statement creates a module object named math.If you print the module object,you get some information about it:

>>>print math
<module 'math' (built-in)>
example:
>>>degrees=45
>>>radians=degrees/360.0*2*math.pi
>>>math.sin(radians)
0.707106781187
Translate »