Adobe Scan 12 Nov 2024
Adobe Scan 12 Nov 2024
modne T:
List s:
stred in tthe ist
o The Sesutne d Valhes. be ales
List is a
Ae caed items. be valnes ts tthe Gst an be integets, fboal,
SRings ete.
i:0t [lo,2o, 3o,ho,so
Onames L"abc","yz'", "pa'
'tello.
INTRODUCTION TOPYTHON PROGRAMMING BPLCK105/205B
t#',e,,U,'o]
nint)'e!
del eptoj.:
be del epeatos is whed to delete n elenentCVal) sing He
index.
t Cio, 20,30,4o, S]
del t J
pont Ct)
Qtput! 0,30, 4o,so
Pn and not in opeato s:
is hsed to check, ohehe a Valhe exist in
eperdo
tbe list or not. Tt setnsns ue ib the valhe ist, oftbesst
Rctnss blse.
i4:0t-o, 2a, 30, he, so] tt Llo,20,3o,40S
SD in t 200 vgot in t
Resut false.
Resnt: Trne
eperatos vens tru, it the speibied Value
Tbe not în balse.
doesnot est n the lEG!, Ottewise ít r e t s
g:0t L'cat", "doq", "CorJ
cow" not îb t
Rect: false
"elephant" notint
Rest True.
t-sortcy
Ortpnt: [Cat","co'", dg'elpht]
Matiple AMgnngent
ent allons t assgn Values o a ist to
15e mdiple aysns line d Code.
mudiple valiebles in a
t Lio,20 ,30]
R, b, c t c=3o,
al0, b-2o Cond
T5e above exarple ill asigs
|ALgment edl asegnot epoatoys;
Sum- sum+i- Sumti
faetfodyi frts=i
prsnt ct)
Ontp!lo4o,3o
S2: SP1+'a'+ s : I
pränt Csa) Geat
ale sinila to t , b except ways
) Tapleg: Tnples
* Frste tples
t (10, 20,3o,
jnynable. The cohtentssed
Sacondly, tples ahe
tuple Comnot be chawged.
the 4o)
:t= Clo, 2o, 30,
t J - (00
VIJAYAPUR
DR. UMESH D. DIXIT, DEPARTMENT OF ECE, BLDEACET,
INTRODUcTION TOPYTHON PROGRAMMING- BPLCK105/2058
lict to tpk.
s: t= Cto,20,30)
tie tupleCt)
prövt (ti)
Otpt: C1o, 0, 30)
VMAYAPUR
DR. UMl SH0 DIXIT, OPAR TME NI OF t I 8iDEACET
UAYAPUR BLDEACET, DEPARTMENT
ECE, OF DIXIT, UMESH
D. DR.
(oldList) prist
llo)-'AA' od.list
deopopyold
_ist) Copy benict
20, [to, Lst old
Sv,
6o] 30].[4o, copy import
isd and
etly imodifed becay deshhtsen
List.
list. a objc
ds (he
the bot Honce
liot sowlie Copy oslCopy)
l deep Hooeves,
lin
ks
a Sepeate
bo]] ['An',
sv, 3o).|to,2e,
lo,20,3o),['AA',
sD,60]| cle:
llotd_bc)
tdlist) Copy
(o lo'y
BPLCK105/205B PROGRAMMING- PYTHONINTRODUCTION
TO
INTRODUCTION TO PYTHON PROGRAMMING - BPLCK105/205B
9 sum=sum(0)
10 mean sum/n
1? sqsum 0
13 fori in tange(0,n)
14 sqsum sq5un0l}mean))
1 Variancessqsum/n
1/sdmath sqt(vaiance)
19 print('Mean-mean)
pont(Vorlance ,vatance)
21 print('Standard Deviation=sd)
INTRODUCTION TO PYTHON PROGRAMMING BPLCK105/205B
Jans
VIJAYAPUR
DEPARTMENT OF ECE, BLDEACET,
DR. UMESH D. DIXIT,
INTRODUCTION TO PYTHON PROGRAMMING- BPLCK105/205tB
k te a prngram to cont frea o alphabets in a qren
#7o
To cownt frag uency alphabts
str inpat ('Enter a staing =)
d=dictc
for ch in st:
d[b]- dgetCch,o) +1
pnntcd)
fo c in str:
dTcbJ - diqet(c,o) +1
V+lties)
prntl Ibe dit'+ 7+'appeas'
E: Enter t e ibp; SIS6G3
cigt Ippeas 3 tinscs
|5e digt
digit S appeas 2 timy
tbe dGt 2 ppeahs times
e digst 6 apPeans timeg.
the digit 3 ppes tise