Python Modules
Python Modules
Python Modules
MODULES
VARIABLES OTHER
PYTHON
MODULES
FUNCTIONS
VARIABLES
IMPORT
CLASSES
MEMBERS
OTHER
METHODS PYTHON
MODULES
Importing Python modules
Toimport entire module
import <modulename>
Example: import math
1) 2)
DELHIDELHI DELHI
MUMBAIMUMBAI DELHIMUMBAI
CHENNAICHENNAI DELHIMUMBAICHENNAI
KOLKATAKOLKATA
3) 4)
DELHI DELHI
MUMBAI DELHIMUMBAI
CHENNAI KOLKATAKOLKATAKOLKATA
KOKLATA
randrange() function
This function is also used to generate random
number within given range.
Syntax
randrange(start,stop,step)
It will generate random
number between 5 to 14
It will generate
random number
between 1 to 29 with
stepping of 2 i.e. it
will generate number
with gap of 2 i.e.
1,3,5,7 and so on
Mathematics Game for Kids
Mathematics Game for Kids
Statistical Module
This module provides functions for calculating
mathematical statistics of numeric (Real-valued)
data.
We will deal with 3 basic function under this module
Mean
Median
mode
Mean
The mean is the average of all numbers and is
sometimes called the arithmetic mean.
Here, 10 occurs
most in the list.