0% found this document useful (0 votes)
51 views

Python

Uploaded by

V P Manoj kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
51 views

Python

Uploaded by

V P Manoj kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 14
kos we wirore of YS ESE mATON 00 RuSmMeny, DEPRET EE RT Ce Lompusee SceWLs Bree seas 4 Saw Awrmace ; DOMCAAY Suess ‘ Wo men So esecg ‘ BURkon Bese : Blow. 2eay Stem \onw—< Bie velie and alst With® — eaameler y Almont Chtively abour = olarm = Steutrums . Nao wo Finally tate Oug Firs yrep Inve the lade Rrueraran | thar wt have hare into Prooinme. Fairy Pathon Prgtam thar Che us the value of Hu boelLon Vani able dismiey aind pian an eppropnet Lonor ens. SY isaohr = True wy [ep olfsaster : Poor (use! 1) alse pane whee!) woe | » | The i¢ and abe line om purton Shr en ty dhor Chern wherher london Cera the value oe | Cis outer) ty Arve. fe there Are Crowe ahon too patina yor Ut Ie eH | Cmemning — hae We) and the, SS Glo 2 "pul SYY ip Golor ec Naad” ; + prone (uptys a pemnrotly / ete Colty 2 2 gern!» pring (orb tH green Pepper!) + Ole Loloy 2 2 U bee Purp ts Pint I 2 clontr tne coher if ty F bag only, bee ton dee Wed | ce Qa [ose Pine UU Etve paver head of tho Color" 1 Color \ atye never heard oF the wloy pue. Jo. C1) Compose funeiong in Purhor with en ample: Pp funuion Lon pare Any ‘Number nol hype DF | Ipper parameters anol return ony Numba — ans} | ype OF Oupur FEL UTS. | yu tin de fee dings With a Punwion: | ¥ Pepin, iF | oy Cuis ro dthne ow purion Runatioh syou rype oleh He Pun un ames Pewathuts undating any [npur | Pavamerens yo Fhe Funan Gnd then Pinally 9 belor(*) funaien Ramu howe the Same yal ov vena Home (they mush trot Meh mn Tetoy bt anol tortnin Opty lerters 1 humbly, ore) wy clep de. horhing 0: soe pros Col His Runerson usr IY typing fry Rama nol Prranthou- WY do. harhingd yy Erample For Funtrion : alee Wmtvenrary | Lolovy + wee lp boloy ee lrved!: erOhurn “tea ® romero. Hie wlor ss VN greeny, + yerurn Warts om green popper. elit toloy = 2 bea purple’: rorarn © @ darth \enow whet ir iy but only pow tan see drt . abses suru tye never heavy of Fhe Color “a Boley #1) tat Fhe Funuion temmen in Ut with Pe IDG OV gu ment telue!, Wy Lomment + Lomment oy (blue) , W. parameters | Argumen® : Pavorates Are the Vaviobla Whith wet th Ho funaton detajton. Par emeters Ove \npurs ro fanuons pavomered revere the Inpur fri the funerton boll. Sr ob pres ible yoo ebltHine Move than One Praremeta th fhe Funuden Union, Hypa oF poy nmerert] di gqumenh ¥ Required | porirional — par nmerers pocnmemer x CKuyword % Depaul Povrnmeler) ¥ Warvi able {ength Parnmeters | SEMTION ~ b re. Reel Fhe Humber Meringss Warioblu i> puthon: Ntumbert:: purhon hw builr fh Suppor por tnngers Cwhol tumbert duth ou F ond (000, 000/000) dnd Ploaring — Poinr Humboars Ctuch Oo G.1yih, (Uy ong fegteg sy. We ton Colutaa Lomiination ot humbes with the vtonple Mork Opernnerd. Promo le: Hee; qo-tor 4¥7 ple, Te, Ang, ae Inpegeys- Pry bequenw ef Algin ty purhon iy assumed te be @ litera) integer, | DY 6 | 5 | ; | woe can ure & Plain Zero lod: Yyo ° Strings + Mor — Progtarnmers wore With brvings oF Hert much mere thon Hummers. | pgrings ove Stguen Ff Charatrers. Ih python Mirgle quors — OF double uss (8 ty Triple | quere oven vary Usehul pay Short TPrings sy yf hoy! tinep! Sy t cree? teyactle! yoy pot 2 Vqghere wo M Yourg lady oF Prorwny ce tohm Louurally doy jn © Ghonrway 3 Eph Levrogasur Young lady ot "Vertway yyy yaravlea: anvioble tame Gn only Lonrnin Fhe | Chay meres | ¥ Lower Bue Leto (a through 2) E tapper ue [eton (& Fhrewh 2) oe fo through 9) ly ¥ Undenlore (-) | i ‘ ali gi 4) | Nome Conner legin With o light Bho futhen dyents Kama thc begin ith an Unda lore in Spusay ways. Thera ore Vaild hamu :- O10', Oe b-erws 1 -~ abe, 19 Thee Hamu hewerer ao hot vail Ui tay de ne Cink tuple ano Dicronary ustth GRareplu : Li) Wir arts dat ewpodalty Wher rhe Os dey ane Cerrnns mlyhr change. we cn thonge @ Tir th Plates add new olemenk and celere oF opere oe Oeisning Ofemen d- A tir HW made from ero oF mort Clemend, uperared by Uma and Surrounded by S7Unue toy noteyt. by sy cmpry — Lite 09 oy pourrdays 2 Pi monday! pi guaday'y Twednud ay! Mthasdey') Tpride'y YY big, bie SPT Umut yt oprich') CLanewary'y Tople + sireiloy tt (ies Fupfes ove Sey uehee OF Qibiemy Hrem. wanre fple by using U rating On era pry pape usg 0: Sw ampry- tuple = 0 > eropty- tople uy One - chormenr Ferler : WS one man: | troucho! SYS Ons — mart C" throu cho! 9 (Dita navia > ho cticronarg Wo dimiloy wm a ltr bw flu order ot trem: = hoanty mater and Fhey Arent refered ly on otfrer $uth w% 0 OW TI, fh unique ley PR auou are Lolth enth — ralae. This ley fr offen om sértey rbwt fr Can murually be ang 6f pythent) Jimmurable Pype : boolean , Yrvegers Ploar, tuple 1 sbring ang Others. Diernaria Ave mubnble 30 Yeu Can Oda) Ueet, awd Unange their ey Value dlemenm. 12, Inrerpcrive = Ihrey preter ; 4) feo betore ousisn Phe Value To om the hame a Th Urenra Oh obfay bom Lonrniniey He Unve6 0 |g \n\ue 7. Ww pring The alu op m- fy) Pasigh 4 Wb matin b allo Merck m fe | | obter oor tonrning 9. | ivy prying the Value of b- SY ard wy Prine tay 4 wy priar tb) o, Puthon Files (py) Brewton mode, Python ha foo bate moder: Scriph and Inrevouive - The Normal mode bo the mode where the Soripreg ong Frnishey. py Alu %™* Tun Ip the Putten MMrey prve rer - merernerive mode ot Lommand fine che) whid gives (mmnacti are Read bren fy wath = MR remanty, cohile Manning frrtviourly Ae Irntomenys in Our memory, 13. Lannperd nd eats A Dicren any: Cry Wer ph teeys Moy Usthg Weegee: WY signals: fl gucent: “gd r TYyelfow!s! ge Paurer ly franol'F TF yimle for the Gamera’ Wy singnab- lays | | otic tags CC 9vean’y treat, "Yellow! 7) | SYY Tir Talgnals Ned) Doreen’ "yea ', Vy etl ow! 4 Lit) Ger AM Reys by wins values: A oyet WN a druenavy Awith fh Valuer, Phiewh tway, femving only the bey. Cyenre WwiFh Uy fo Crone fh tbr We We enclose Sha Ov More Cony | Th dieeonary bath feay Mousr UNF ue. | | phe ser Funutobh JOper ore Value ip Gurly bracteb % Chewe hye NYY emphy = seb = Ser MSY tmpry - dtr surg WY even. Rumbas s f0r2yi bith SYY even. Dum bend Poresrsat 64 Wy odd-humbers s T1i3s 51744 Ye odd = hum bes f Wedeted 19 Inrpet Laneed with break and s&ip bheag with bontinuwe — frAremen VW puthon? Lane! with breale > Ure tan ute an Taint Loop Uiith 0 freak Wrarerreny we brane Cur oF the loop When oO fre lonraniring ors rhe letley 9 iy fy peo! : yyy while Tue Lo Spurhs Input (Mg ring 1 Copitolmel type an quik} se TR seafh ets se break ve pring (arate: Capitalize 0) Bering me Capitalize Chyoe 9 fo quip Tt bur tip Foe Jering om Copitetinn Prype gto quik gs hey pir works | rey oe Works | Otring hy copttalige Prype rm quik 4 ooN,Y fontinue JParemenr : | fe you olenip wane A brant our oF Loop buy gut wenr rp SKip ahead 1 the pert i hrarion for tome = Frou oh - YY while True: Valea: (Input Ch trreger rplemte 29 ro quirks") ATP Malu) cr) ts He opuile ee breoe Numba = Mr (value) ce th Dumber ye22s0 + dt oom even Qumiey | Lon Hae | Paine Lnumvers ! fequaveg i") humbe % nambe) Inresey , pleat Pym quiryy P Square fy 7 | | Inregert Plane FY rm quikIs 4 | | | ee | mreger y pleat Dare Auf yz 33 SB Sequred bY Mregey 1 pleore [ %ro gutk J te | Inreger 1 Please 29, to quik J | HK Squayed jy 26 | Inpegey, pleoe fom YurtJ:y , WS degen -B Nw before dusign the value on the Name a. This Cranres ah ob pou bow Conralining dhe Inreger value 7. x prinr the Value OF om. Yepnign wt bemarins b alo strig m Obfer | yon Conrad ning 7. #prvinr Hae value OF b. 9. variable hamu tan ony Canrrin ghee Cheracer: wy tower Coe fetors C9 through 7) y Uppa tad fetes (A through ¥ pis (0 Thrush 9) ¥ Undy sore C-) Ss: BS 3 vyy 2H RK4F hy we do the addinon Pinv eF3 b FS ard sap) | 1) 20+ Bur te we Ola athe Mule) Plicnon finc beta and 2412 fy WY. TR PY eben Ib SRE mor 1angnoges pou rip eaion Any hvyhey Pretedonue than addtHon go the dttnd Version iy Wy Uthd* 4 Ig, A Sy dae CTFUe) DY floor 1490) 1 Ae. SY> ome (fale) YY Moor (haa'y 6 44.0 Triple Quores Hx hor Uretul for short strings fo parhen — because triple querer Only Por Paragraphs. The mot Lommon Cbtope sequanu i tos Which men begin oy hoo Whe, SYS fomplerear > "ah many \n 8 plan tn 6 Camel s\n Parama.! SOK pene (CGamplerary A omens : BR Part A Canal, Ponama. go tales TF by Wing Wiaare ——— forrnucen (03) 19 tuple by Using mmas Mot Or ahertonay by uilog | Curty brn ety) q yyy mani > Tite = Cl areucket 7 | thie) Mnrpely ys mary —toples TQroucho yf chie's | lnrpe! SoS mary- alte s f ' Wroutho ': Vboye! 1 vehi! : ‘agoapo ‘hosp 7 SYS marx Tite p29 ‘phono! “Woo po? yyy panex - Pepe D2 Var po! sys marx elt Lt Morpo ly Tharp! A seu Hie “oli crionary with in valwu thrown nwoy lenvirg only the Wey. YY amply - sere Jaro YYY am phy ~ det sau yyy even. Humber 2 {012 gr hie yyy even. Aumbers Por tray &% SH odd- humvee {9511 93 SYe odd- humber AUB MG IVT” g Charatrers every thins trom “thar Lommenr. fro thir the end of the Uerrenr the 4) Part oF the Puthen oe hor have oh mulh line Lommenr,

You might also like