2 - 3 Functions 2
2 - 3 Functions 2
Python Library
Python Module
Importing Python module
Using Python Standard Library and Module
Mathematical and String Functions
Using random module
Library
refers to a collection of modules that together cater to
specific type of needs or applications
Library
refers to a collection of modules that together cater to
specific type of needs or applications
Module
A module is independent grouping of code and
data(variable, definitions, statements and
functions)
Library
refers to a collection of modules that together cater to
specific type of needs or applications
Module
A module is independent grouping of code and
data(variable, definitions, statements and
functions)
can be re-used in other programs
Library
refers to a collection of modules that together cater to
specific type of needs or applications
Module
A module is independent grouping of code and
data(variable, definitions, statements and
functions)
can be re-used in other programs
can depend on other modules
NumPy
some advance math functionalities alongwith tools to
create and manipulate numeric arrays.
NumPy
some advance math functionalities alongwith tools to
create and manipulate numeric arrays.
SciPy
offers algorithmic and mathematical tools for scientific
calculations.
tkinter
for creating userfriendly GUI interface.
tkinter
for creating userfriendly GUI interface.
matplotlib
plots, charts, graphs etc.
Python Module
is a file (.py file) containing variables, class definitions,
statements and functions related to a particular task.
math
module
cmath
module
Python
urllib
Standard
module
Library
random
module
statistics
module
Built-in Functions
need not import any module for them e.g. input(),
int(), float(), type(), len() etc.
Built-in Functions
need not import any module for them e.g. input(),
int(), float(), type(), len() etc.
oct()
returns octal
string for a given
number
Built-in Functions
need not import any module for them e.g. input(),
int(), float(), type(), len() etc.
oct() hex()
returns octal returns hex string
string for a given for a given
number number
Built-in Functions
need not import any module for them e.g. input(),
int(), float(), type(), len() etc.
int()
truncates the fractional
part of given number
int() round()
truncates the fractional returns number rounded to
part of given number n digits after decimal points