0% found this document useful (0 votes)
4 views21 pages

Week 5 Python Lab

The document discusses various data types in Python, including Boolean, sequence, and collection types. It covers operations such as accessing elements, modifying lists, and using methods like append and remove. Additionally, it highlights the importance of understanding data types for effective programming.

Uploaded by

sollapurbhavani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
4 views21 pages

Week 5 Python Lab

The document discusses various data types in Python, including Boolean, sequence, and collection types. It covers operations such as accessing elements, modifying lists, and using methods like append and remove. Additionally, it highlights the importance of understanding data types for effective programming.

Uploaded by

sollapurbhavani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
week 205 Progneaes “to Ladirctood! Sotolupe k foala tse pl a oP Nonacke “See —f. —Yeaiiatele Defias bo lhe a sotege®) Be Nemec < dota oO Nall. z boy 2a a ozs Tal » ba B ilu AV Rloads oo tis ou Fy Coeiplen ooiek ta calSiiolole) 3t 7) ; u-Ce> Ni boolean > bil -79 Boolean data type “ot possible yoluo “Totus on PlaSe_ hag only wo Seqyunce dota Types rorshas Iniemy ‘bs c z ile sors of clactints on items. g ; TI Shyaq +E abot # | most—*opilan fh usefull cata types to prying é PEyalan - Exomnpl em S = “Hello” ! poral 5) our put Ra Hello Zi Gtakiag operations. Accessing | Cuatectess “Condiaing) srodestag t— menos aclessing One chasall MOM A ‘Siahag Using ILS PoSition oumbea ° on om) -O a access speci Pic ee of | Sining ave, —Ve todlest osttive fader Cle Pee Righty e Gabo wa °o \ 2232 us ex > Se] Puthoo . aid ~oalbok NAY pxtot Cs Col) patot CS Tat) (patot CS Taiji ¥ Pere © Negokive: it adentteg “E Right 2 Us rr ; Python Alsot2ollo dD Ro dew ag sPaom the Chomactea 43 td umbs en 37 S =Ppyrthod por Cstsaay = se” ae parrots GS) Sask Wd. 9.0 dt posal Ss | Ney Simiag built 10 Puockions | \Oppeacd =) S =" glecnip" PororL(S- Uppeacd ) =a Jowenc) > Convent Al) Chovntten 15 lowey cose. the Y po AE eA > SS RLEMLO, Paiot (S. lowenc>) SPA SLOWEY Sy THIS) method » menove' Gil | eal othe bike pace. before y aPten,” a Stoiag Sa" sctemepy | i pataLCe. stipcy) Cadnt "3 ited coioy Dime “epectPred, obomeak fo Staiag Sas eLemepy as i Paick (ea. CoustCns )) leocd leagth of siving Ga = “ELUMLPY pxtot CleoC Sad) Condete oatidA Ciotarng) a= "Hello" b=" woad! ImoktCat+' " +b) 1 ning Simp | TPTOINTIG wenenog Gocobrolio_ - court ple. Siang Aato, coe. Sizing Wosag + a Boame. 6G. Nun ben ene ple Qrostog SON). Merhod_ > Syckon iy Velepemedom" » goin Citeable) erom ple. a Spoce jorn worls =| python’, ‘rs! Y easy!) patott* _gotoCboads)) _ We Ho] pu-® py then ¥ 8 easy cagty Jfnaage” tees: " otoCteens)) o/p_=>—Ppple: Bacaca.cngg0 SWS sian @ Comma > 5 @ Spoc. > 88 Mik Soleo? Hat nSeemiColoan sy Perle wv i t wv = w ©) “F crear 1. f aj Repetriero9 Vows? Lue Datos OMT ES.) oP Pbk (eo GPS dev sees — ah | i EMenuese ht Pp operalomsS _=h_operarlovs_checle whether: | = 02 _ word _ertsts 19. ~Sising - =| there “Lvo operlo~ Z - wal ae O $0. > Retoos mis iP volus%? © paw i ©) oot 70 > Retwoe im {P Nolus fe I Ack. paesen t hec: = ome evan ple @__0st9g "tO S ="Pputhoa [Link]" paol.C Putian a - SA Toye fot pao ' 49 S dh Toren” paint Tave" ‘ta S$) 4 -Palse a ey oceny Comey homey Cory Clee Ex0ople @® “os oot 79 pot ( sjovat ast 0 S yr aimee | S=* Pythoo” y 20 Cpa nots fOr ie) # Plase EI parol. > =| St || exampl @) Cheale os a ="Hetto'/ 3 Timers pmo CruNtas )- Bing pool ("AN jas) #¥Plase enenns kaldog a Sank Ceseein ig) OP Q_ |[oisiog Sy tad Glaiag [ele Stop iStep J Short +3 todlex' to begin on, Slop > inde +0) end Cock aay —_— ' Stee i> sump bila Chonactes . . l I | I I I i Si= Pe AMO OF GP sols py woe i(S Toso) Py. parot cs [2: 3) 1 tho pan ST2u3) ill pyth Cotoot ) paigtCs Cs? Ty. MW hoa »Cead) STI) il) fall Sb?o09 porot(S 0x63 94) Po potat(S[-u*-ad) oI tho [Link] Ci3-9)" -l-aont p. Wreaevese. : nd be <1 Cy bonl f 94 aS a Po te trek 20120040» ae A Ost To, “python, 18 Collection used. [te etome Multiple items “ia a_ergle Vontable ~ ze COM Stove cnultiple Valut lite gunbene, Stor 1 on evVeN nixed doa type . ordesed & changeable, & Falloo dupkicole Naluse - Creating AtSt, : i} = oQuombers = 20120780 ;U0! So | Ve foes = C'Ram", "Sam", "Ten” intwd oo. Ca, Meuo", SS, Tore | Access 799 Ge Saieoue C jackesdag ) i “apple” ” Baca”, 346 Tod) } A = ' patot C -ostS) C22 os patot Cfasist=a3) 7 CB \iCIag, TT hums = lie, 50/3040) SOG Go) * vpstot Couns Tos) > 20, 301 ao SE o [2 Bd). He 20 1201 SO. Cotint ( AucnS [2:3) > S01 40: SO: 60. 5 eS e764) —7 1onBorGO ik Pa otot Coucas CaS 23) 2b: Go:6o4 =a) ) = apes fF) Poptiod Coun B.C Colong = ("Reds " Bluo") Colones Ca =" Nou" eel oe eS -parict Ccolosis.) ain ee List Methods Ol append >A ceihed ured Lo add Ne5 Obrment 40 the lark posttton oP dhe liey =Sa=Taia sit een - a 5 ed Cu) O[P FF 2 BSG - patat Ca) ®)| sogent. Codex, tem) 7 add the Value 05 iden ak aagived Sodey with specific gived — — Position. L cesta: PIP. 6u > aa Bespin te a. toseat Cay a0)" J oa a0, V3 tre Pt Tlf oe ( paieiCa), L @]_semove () SD Permove the GpectPie: teen ta [et - &a => az [20,90, S07 50 J Od O=[A6, 90.30j QuaemeVve COB) Yoon ) J Or pacroveCao) t pao Ca) _ cs TEoe SL Ti camstnc) bareet pope) > _SemoVe —G veloa Kho lash Olimest Ao AES Nels Lov tans TE asUS¢, A) v-os Cs. G a3 PoP a: popCo) Qa poratca) paiaiCo | a a ° ca entendk(TSo 603). ad —) Adol multiple ehenent, . eso] ert > Gals oumbene 19 AScending [Ome | descerdiag = pai a> as[uia 3,24 a: SOMO) a. Sr Gevos=Tae) D ey) atCad_. Devensec) -» Revenees tho omdhn of ex _-»_ ala, 2, 3, u3 eb _alteceoks a. nevensec) —Patetce) te Oo” => Ried Ceigta: Ee We Q= [a0 Lo, SO: uo, Sod ee —_patol(leoCa)) ; @) : hs i! Jor Liek ‘Pa loop —tasy to suadineiasd: ea) Fags = =["Apple”, vow eae 0 mange” | Lom, Paw t fo Prdksis patio Pout) ex) QuobenS = [20 9.013040: GO] OD aun i9 Qumbens: . ) Peat Couns ET — |] Ii, i + fas usd Numbers = “46a £0 é : Pomoc fo ouenheme*s * - otal = Lokal > % paiot Ciguen oP dumbeng 2", tobal ) Teh OA SEY RTE oa ae eee Skciag Bi Pfemena ‘elo set & Stora. Gtaiog .- Wecr ton v Fel. ck CIO 9- OF elocrert teers, j Can adh be usiag elicsa dala _CaA lo Caan code ky wing Bliceza fatal. hoto fof. bb ca — “Lent =" pyihoo” -_ HuenbS .= [20; 20, Bo, 401 GO| pata gt L833) paiot tyucbs C2iu ’ ey rato olp > Yt DQoSouo. D4 are 2 Elictag Ageigament Cig ci PRenene ) — tet = \Wetlo” i 1s - gio teat Tasuy. "ABE: : patotCtent) olf SS exvoa 1-@' list WS" alow 2 AdoskodoTa 2&Svul So once ) _aucbs (224) = [201 So, uo] WIS es E 2 OID = 3 @ “Rovege “‘C@acne ) Fe patot.C"Pythoo” Ut s patot Cla .a ul Gee 1201 SoS , | | a 7 I _ lick 109, a eo 4 : : 30. - =~ — 7 __ Begpesnce | Cote ¢ setop + ietep iS Steg > hee 6 vegia Gack Stop > “hom & +o ead Cook Tok a Step => Yoo coo oS 098 +o } | coove oY jug Pe i a T j ar waa a eS Aoki . . (0) uc cares ZO, U0. ee | Le paiakl aued Unt ud olp > 201 B0iq) eT. Stayt BES qode ay StoP beRose ae © parot Cou Tt sud) Jolp =. 10, 201 Bough eS [patos C Cause. C22 Ty. ep. >. Sous, BO __ © pato+ Cada Gs “ > Dole Wer © mat SRE i ST . Ww PatatCoum [078% oy be op —>_ 101 30, SO. e Geucn = [20.90; Sp, UO. S01 Go. 40) Axfo-t CS C0652) OP —> tor Qo, S01 OD PoarotCaam [-ut =a fe FRET soe lee i NanpE We Galenuoo aP” ome aa 7 ites, aba swith 008, big _Bevene ET res Wane Ne iS Tonmulable Ccancot — Choo iL pe A I add, nednoVve , Da oo. e i. aPlemn Creation . a it I e “" \ oF ae ay lonrey Crore Ie a 4=(ao 90130) paiot C+) Os ple sid differs data Lypes. = (2, "Sucnae", 20-6; Tous) "at ot CA) + a Acces ering tuble elaments Codex) > . SAV \ yy += C200, 200, Boo) — miotC Cod) i: zs col) i I e © | Shciog ao 4 ple EP @ 4 =(a01 201 Zo, uo1 60, 60) ~ : paiot(t Carus) olp S@o, so, uo) @ +2(20, 20,30, U0) S01 60 paiot( U.s))o}p thes D0; B0) [Fa tuple port Ce Ur) using Step pmat C+ 12] 7 oIP (a0, 0, oy parot(iEut=a)) > olP C30 or coy OPexokion Ss. you tuple ConCatesatioal +) Roto two tuple a = tas C212) to =( 3:4) 2“ Porot Cta tte) oss - Reo eat. te Cee) 25 paictC£ * 3S) Membeaship “Cio | oot to) += Cad, 20,30 patiokC 2010 +) Sy Due %=C9:2,3,u) parrot Cles CD) MiIAcdumM ) cMasenum , Guo ke (a0 96, 20) i LCono (4D) motor CA) 2 aict(cumlL ee ee ' i Me thed? TLE Lb otea Ta ___llappenetc " BenaEO._ pope) _e9e ook aNowed yy i tuple . Ol Gount €) = Counl2 od cnaoy | Limes [Nelue ‘appeene to Are -tuple - : Se 4 C3:21:3:2) 41 2) WS5454 49 paiotCt- Count C2)) today > ekumn the -ftodet Eqoet ibe) af {4 ESC) the Piast Occrenen ce Of 0 Value ( = (ab: 201 Bou) | pmat Ct. todexl Sod) =! | Create a Sek oO] =Oa,2/3:us I] poroi CS) | Ges 2 Pa a2, apple”) 2, 24 ! patol C&) ® dun plicole flue ool allo « G=0a, 2, 239 ParolCs) | or ACCESSING Elements to Ser. [Ane get one uoordeved 1 60 * i 2: oot Si Re ¥ I Access wi%o9 ~ loo. veigg ta Peyboond | ot ye Sey | OIA, — Poa loop S= SOAS aeT 30% Lon fzem 19 S* patoLCitecn) ) || Using ta Feywond C menbenchip teat) S=220) 90; Bob. Pmioi C20 10 3) pmiatCso ie Ss). ‘ Methods aN \ > OAAC) ~p add “ooe “eeacmentd to the set S=2219 {S244 Zodd CS paintcs) updorte Cc) adds eoutiple elonenka st ee S= 29,98 [Link] Sud) uu ne patot CS) Decale C) =? QICMONE rien’. exon °F ele =Wa,2, 3% “ 309 vine ot oot ppedart . [Link] C2.) Poor Ce) ee pmiot CS. pop) | LS Cleonc> Sra 12s [Link] Coce bines two Seb +. o222,90% be Os ud 7 + 00100 Cb) jolem section C iS A non eMacne nM - Q=297,9, 2y b=22.u,2 foiCa- intevgettion Cb) = cae so bp Renena -v-the Aanen Gab Sel | —loucl_aol to Second. ~ patal (a: &Penene Oy) — Tl =29,9% 2) - baa, St olf a putot( . BPPemnerce Cbd) 10) [Summernic AsPPemence C) OWicnent 80 both Sets Cr@p-t Cocmeod Once. Q=29,2%4 b=29, 3b

You might also like