Python Basic Modules and Libraries
Python Basic Modules and Libraries
Basic Introduction
must
sample size
Claus
G Choices Simillar to sample c function
but slight difference i e sample will have
repitition of values
Ca c e d d C f
variable
This variable needs to be sequential
data
ex 2 a bit d
random shuffle 2
Caba c d ay
Aliasing this is giving a temporary name
long or complicated
This is only temporary and works as long
as the kernel is active or we need to
re execute it
ext import random as nd
so now instead of random module name we
random number
random generator
whenever this random generator wants
something as a input
This input is given by a function called
seed function
ex random random e
seed function is called
Seed function will take our current time
in milliseconds as input so the random
number keeps changing
Instead if we mention the input of seed
function so for one single input we will
same random value
only get
ex nd seed lo
nd random I too
import it
module name has to be unique and we
operations
Maths Sss Py
def sum a s
return atb
b
def subtr a
return a b
class F
def init self a s
self a a
self D b
2 10
import maths's as Mt
Mt SumCl B
a
Mt SubtrCU 3
1
Mt malt 214
O malt C
8
mt.se
to
Assignment
string methods
D upper C
2 lower C
3 is upper C
4 islowerc
5 Capitalized
6 title C
7 is titled
8 Swap case C
9 is digits
lo is alpha C
11 is alum C