Unit-3 Python Part-1
Unit-3 Python Part-1
Unit-3 Python Part-1
UNIT 3
Lectur notcs
pecties
pstiht(tyoct s))
w:he(eo
yalucs.
petint (MÍiJ)
30
dànila to Qist (tent hat ot es emrtabe . NO
Tknlt;- Tunlt dhanges are
Y:( to,Jo, 30)
pint{"The numbcNS in n Tupte:")
p9tint fx fi3)
30
b'io0
(o00000)
et OxOSCFPCCo>
ptta.data)
prht Ci)
0UG1Gble in nthon
Lohich (an be n9tteo as o Como- tpaYoted otues (iternt) bhcen
troty Ovcg .
irden.
ostbity dky.
Oundctig
die = ('phyi', 'chentry 1944, 2q0oJ;
rrnt ( Uolye aOOlabe at inden 2:")
pint(sin{2])
let ands,
atnt (*ottn detetihg Vatuc
Valuc ot index 2:")
ptint
Redut
3
Jugin
Ien,2,31) Goncoctauatn
,2,3,+,S)
hepetttn
('HHi'H!,'J
rtemberdkap
3 jn fu,) Dtrato
5,6,1n) C,8,
,5,4]
now isru
dite tista C,3,S, list
mutae Lists
(+2) slr
3[,o, -= (o,
o)) ct(range
(o,to)= onge
2,
·[o,),
*k,-)
j-) i,k) range Ex:
ond Peneh Bull-în
toncins
its.alando)- ented sits by a kingle valev
litd ertend laccke) extend lit by adt
yaluy
istd.renmove (e) -
revnu(- teveu l in place
’pnud)
Extudl)
I H)
>pemovc()
-’Rrucrs)
S>>1.0npend(1o
s>s del(x13)
Dh:-,s,8, 4,10
Olp:-1s,8,6]
(3) Entcud:- Cnscud e ttyueuce to a iat ) n t -
>n: f, 2, 3,4]
>>>0. inscat(2 (D)
»-344,J >>>
Ofp-l,2, o, +,6, 4)
olp:- ít, 2, 3, 4, 3,4,9,
>>>=9?,10, ,6)
Ss> 7=(, 2, l0, 4, G, +)
f, 2,10,,)
Ch-t,2, t0,+, )
order
EcKo toop
a
Lt Cung-h oydegn to @eceas frutor ie
ticps.
3 poromt ae urd Gort, top aud
be
end
Hort
ite k1h egothe ina
b d
2 6
pint(L(2:-s)
fotnt(ot (2:2!])
Th
bw
end'
L:J= ", 2, 3)
print (L)
olp' a',,2,3, 'c,'a 'e)
u rscurt in The
rtd to ueet it an ctement
tt inthotzing
Jis =l, 4,3, '2, S)
Gotirg
Wenut wh Value
a (1y:J
adude
33 4sr
o 93
8399
23
Oh-alo:9:2]
ota: 2;-7
-9 -8
3 6 8
a f: :] fo,", 22, 33, 4e, s5, G]
-(55,66, tt, 83, 9)
af5:-1) =|99, 88, S9, 66|
3 4
3/
dd
int (l -3)) - ('ee! dd [tte tat1
'ect
cloug
LU J 0
rstin(e)
0/int a, fby,o],d
LJ. appcnd C )
ptint (L )
Land t o -
potint (a)
Okirmut fatrrtut b-g.
Conina i - wc want fo
e neeol
to cuoid ne
a coneatr a
Auopl )
Tousel)
locdt)
PLoteying
30.
total o
(lae. in nentCS:
ton
total t \wae
etota )
The etemu
potint ( The tortat o
dores =(3.5, ).2, . 5, 0,5. 2]
Hotat O.0
total t= (atue
= fotat | lentto)
ctIerage )
naint )
olp-53
do a cuuuctba
& det natat:
to
umeers -[2, 4, 6, 8, total (rertr))
r m total
Olh' 30.
c din ():
rauge(o,1o) :
cfosti in Qist.appndli)
Golen
pnt (olo1)
brato)
psAint b)
puntlofo(23)
Ait (o)
pAint(b)
potint (oto)
ponint (b)
COcutc =I
T,,3),(4,s,4)
(I, , )
rauigr( 3) :
nOcO. onperd (0oustce )
table appoud(Do)
otit fabte )
Can
maf
Y in mat: daplaye elintit
Yow by row
[L,33,
[y,s,63,
But te oa
e ach ow; hevec
anothea a loop inide
ad
foroop
in ma
Pit)
3ongellelmat)):
io onge ( Lan(mall:1)):
P t(,malilR,eudo)
List Compre hau iA
list compe hsusiovd 2oet he ation d M3o isty
st , top,
dectonay d aange) hat satuty giuen condteon
3 Containd vey Compact code bAualy a
2) # add cpuas
Squauarap pevd (x t *
as
Can dye scestten
Sqharey x**a tor x in Yonge (1,11)
Synday
hem in
Lexpoeion
in teableg if stm
for tem
Colains elati
expremon- aceddng
Staledo
Exa3 X = lo, 20, 3o]
Hos sin y
Jat appeud (ieD
22, 32y 3,32, 33,34
toutet C",2, 13, IY, 21,
it Compoeheim fo algove erampe
ut i+5 fori in
in X
-TúplcJ d tupe w a coetibn'o hich e 09dere d
n=('o"b', 'c,'q'
nnt (7(3)
Tunles ae udaauabie.
K-(8,5,a,', )
p9tint (i ) aa
Sorcted voie Orcerxt in a
olp-4
dog a Speried vaue aud esnu he
ound.
poin 4 cohee it coas
12, 2)
= (, 2, 9,4, S,6, R, t0,2, 4,
M, inden()
(enl .
print y)
olp'-12
Tunle
tosteg tn tupes
Basc opoatou on
dan(studet)
vCan vepcat tope
feas (aSo00 - 0o,) y
Prnt(fees)
(So00,o0, S000.0, 2000- 0, 26000.0)
VCan Concaleho te
raí"