Page 2 - demo_vp
P. 2
FUNCTIONS
USER
BUILT IN MODULES
DEFINED
TYPE MATH
CONVERSION
INPUT RANDOM
EVAL
MIN AND
MAX
ABS
ROUND
Python has huge variety of modules. We will be using some of them when required
Difference between using module function and built in function is , while using module function
we have to import the module first,or a particular function of the module.This can be done 2
ways
import statement : to import entire module
from statement: to import all/selected functions
Example:
import math
print(math.sqrt(2))
print(math.sin(3.2))
import random
random.random()
from math import sqrt,pow
print(sqrt(4))
print(pow(2,3))
from random import random
random()
2