You are on page 1of 46
oe Week = | pis < prt, fuylhon preguiown to find those ruplin udaith ot disile, by 2 multiplet S bw 1000 and 2000 . CODE : don i in verge (1900, 2004-1); it(il82c0 ond 1 /Se=0); print (i) RIM! dy write 0 python Program fo quis 0 nurnaloort b[vo lto9. B | cope : oo tnapork trerdom f= qardom. tardik (0116) Oe wt (input (Ve )) c obife (i =i) elf (ie “print (4 = {0y" tonne (')) : : 7 Samble Oudput 4 poo , 1040 , 1080 1 20, 160 100, ayo , 1ABO , 30s {360 _ [yoo + 1yyo 1, 14BO , S20) 1560 100 7 [640 , 1680, #77, 1760 (Boo, (Byo , 1880, a>, 196D Gamble Ouiful ee « Gruss op rurnloess belwett 1 10:8 Cuutss & Finer Coa, {1% (0 46 buss 9 ruenleort Lelweor Vtv 10." Well guissed bo At: b sik 0 python program to condtusil folle - Loima/ follow, , using o wasted fo lof ; ODE ; as WC input (“a =") ) oe tox: + aa nara (, att); : don j wn Nange (1.1); podut (2 Ra andl =f") print Cn) ton i in range (a-1,0) -1); don |} In ange (1, my patnct ("ae eee) Patint ("nn") y. AIM: do write 0 fiflhon Fricaviom hat acapls a wooed. from Ub ard Heese iio cone: Se int (“Gre a word _nevodel') fori in “range (Lun(s) hae ) pried (501), evd =") " print (“\n wD) y Sun oulfud. Ape roy ys X ta Xk x Pe a a. ¥ Se hit a word to revere + Gree k's Skeeg, \ 5 AIM: to write a python prego which takes two | daits (9018) ard v (column) & gevarades 2D aray. Elomend | value th ith smo and j-th column of aw Ava Be s Come ? m= ik (ited (abue of i=") ne wat (input (i value of aw) fist - CJ fe iu Hange, (om); wl = (J fer jo Horge (om) + F apperd (i*j) ISl- q (col pant ae ? RIM aco mart: a fython brogaann thot accepts a Bhi avd calle runloos of dats and fills « | CDE: cm. string = Inful (“eter Pere) mcd torn in string 5 i#(sishhat; q nent] elit (jvisdgt ()) M=m4) taf rurnloer, of tle ? 104" format (m)) mvdlor of dats © f0%" gomat(m)) Samp Oulfud dupe “ae [ta%0, 0,3) , (o 123,4), [ort 68), 66,4, 6,913), [+418 toy Sowfle Ould. | oy 6 thug oy0, Mowk.123 TAI! unite 0 pithon frogiom to chu the lb 5 fosswond input: by user CODE! sbuing. < infu (enti fore?" fait = a for im Asing if ('.\slowes (9), » ie [Gri MEE. ieutfens (3) 4 Uzut) elif (isdigt 0); 8 dg edge Ah (i220! on 2s 3! omiies 4) gph = sph) t(hest ees ard digt>-r Bel sch 21 Be 8726 and 34216); - pik ("Valid Prssvoorel ”") prt (Pot = lel Baw") | Y5T le Odpit ofitec Soup nee ee Ae valid A AIM! zo ussite frthon program ty find vo's bw 100 and yoo how tar dat 1s even riumber aes Hens ae For itn stange (100, 40!) ; $2 sti(') | it (ut (S01) ‘e 2= 20) and (int (s0)22220) and (int (608) ‘2 ==0)) ‘lems, offend (5) prin (", ", join(itens)) ; AIM! do weide 0 _ yllon og te ouvert moll, Pe poms = ipl (Yorn te woth £1 it rama == " privt ("Qe e% a4 ‘ “ae F it name in (" Ail!) 5 cunts", “Bebtambor, " Novenmloct") ; priv ("No af dayp a dup) wn [‘Sa Mee “Hayy Aa ‘eet " Decne), Ny, of dys Slay Mf a ant rave") Sample outpuil 5 HOD, 202, 2d4 206 08 A80, AR , By, RE, 228 yo) By hy Yb HR 1 86O/ ER, RBG, 2hb B62, io, 282, aby , 286) 288, 400 « Sample Oulfpul i! vist of months! Tamuosyy , fobusasey, Mauch, , Apsul , Mop Sunt, aul r August t seftembes, Belobo Novernber, Leumbe Sep he now af pron, 2 November No. of deys 1 days 10. AM! do costite python prosriarn fo sun of tuo given idenes , CODE * tuum t= int (input Cent 0 rumben 11") mua = tnt (infu (enter a number 2 1") hums 2 num) + num? it nungr oF and wwm36=200 ; paint (208) else or (nun 3) | AIM! do unite 0. fybon (Program to covstouel Ue follaning fallow) using wetted! loch rune + ‘| Cove * don + in sarge (9,-1,-1); ton jm range (1, i); print (i ends”) paint (“yn”) IM: & Aafia os tile ‘Program to weale 9 ee n given isk of inkegows: def histogram ( rum nue) ; i toss nin num | output 2! imes = times~/ sin (output) Dire ruts °y (on); Sample oul : 200 92 200 Sample Cutt : aaa 4 149 494 38 8 8 88 88 i Pl aes i Ae EC xf 6 CHADITOO) Ge. u4 GY v Ae 5 ‘ ran) Oulu: ' Mea ee ot aby ee wok . PR PE eo, a: abi, wh (evdnegy 5 Pitowos v] MY \ yet “ ayah bs | ty AIM! do wosite python prgnam thal void Halu Paul ik tun ltiger vals arte pol an {oun Su ot diffown: a“ BS GME, «item fi = ink (snpak (“nwnl = ")) ran 2 = itll (umd =") Yt (num I= = num 2 BY mun) thum 2 ==5 On al (run Iran’) eas) Ss print ( "Tro”) else pret (falco) HE AIM: " 1tr (resJ) My bis ei fo daw uriana values pee ave, * count ) Sample udp. * Sample Dutput ' The orainal (it i * [62,6), (3,3) |, [(02123), (22,17) , [ees (4,9) athe converted tuple ht ts 3 (2,912,288 19), (6) 3,23, 4,0] Somble Output. | lowal of unique values ose 6 mM: Eon fa do fin ll ose | corbivetons fram hoot digits ° ko det comb (tis): | fon i in ange (3) * | don j in warge (3): fon K in Hage (3) it(ip=j and jick and i =k), print (Cristy Cid, tet Li], list 1097 Ih) Aim! sit fython rognon to print the von numbers for a given list . lot prinbeven ( list We toy 1 in Leth! it(ih2>20)s ; fiend =" "JD p (list ) Saupe Ovllpuil ; ( a8 1 B62 sere meas! ea oa yt Sample dulput | 2 4» @ &§ Wo. | AIM: Bithon program to combinations fem trae Be Re ee fo, i in Mang | den j tn k W) Aim! & wsde fyt ave nabs &e printeven (! Aims b sonite python furcton that chuks whatber a frssd shuirg is folindtowe oH vil: C06 at plone Een (5) 21 nélusin Typ ey (F s(o] = 250-0 (ill rilurun 1 palinghome (5 [1 ;-1) ely: i aétusn false j = Sin (input (Exton Suing ") ie fis Palindweme (a) SEN Gabayy, pall ("String Ss a Aalindnenee!(~ )) ake * patil (" Shing “ot 0 palincyome - »| Aim} lo orate python eel Lacks theue. Whethor a Gieyy raulo tb freee af oH ne ode: det prime check (ni » si th(me2)? ; ™ xtlua false Beiit (n= 22 — ny teapb feteno . petugin “Powe ; a a priat (Prine - check(n} ip gouge (21%) Kr0 ) Abe en Me) BF exch Sample Oubful * Enter aloung Mouuveots Seung et a fobinchome Y 9-348 ta A SRMIST voll ! i ee a capt dpb eS CODES ehoss SRHIST o det nit (self, sco, dott deft eept 3, fl ty “hse ad specialization) 8k. bho = 4 elf, deft PA dept self, dept 2 2 defte self. bbb 3 = 2 Apt 3 soll dept y = deft bell, spealizaion = es secolization ae "Book of cornputina" * ne" , “D5Bs "Cute", “CTECH", TT y) dink ( “ BEGORE Deleon " vt ( objt. — diet) Sample Output | tviginal ables and Hei welts of Blade school i) SRMIST. : dept > Compe, 4 begs cept & Adificial dufelligence dept 3. 2 Mechanacol Os apt 4 > Biotech. , Attey aetling specaliaaton. Pat schoil D> SRMIST. ee dept! > Comptes Beiente ~ dept zh Prtifieial Intelligence dept 3 2 Necboseol aa > Biotech Cy ie ket, cbpt2 ea AIM) to umile a (prog Four 4 coutole it a \olrsses. CTéCtt y CMTEL, nw, DSRS: Check efosses oon subclasses of; frill sin ebeck tess on not CODE : Class crecl: Pass Class CINTEL’ pass Close NW ; pass Chass DSRS ; Pass ete obj = CTECH() elntel _ obj = cintetty Nic. ohj = NWCC) alshs - obj = PSBSC) nesult =< isinstonce, (cledh obj ,CTECH) Tf nesubt 5 paint ("Yes 2) “ pniat (“no'’) y Sample Output : false fale Ful False false Falcone false . Cla whttoy He 10h cesses we saiel castes of lull nanen dhbses erinots pur Tow. y.| AY * bole a class rome "Reclorale with too dala memlons - fovgth and Lyeodth ond a function b cola foe the ava which is ‘leglh™ breadth. | Cope : Chas ruilargle ! Eavett = (0) breadth = 0 , cic (self, asas)! if len Orgs) <9: Sideih © 9795(Q] Self breadth =a oe elit (eee 9s C1 self. length, = 9993 [oJ Sel$ . breacttt, = 091950] det anea (self) : netunn self. lenglh*eelf, bread, bl rudavele, (5,10) "Pynt DT! To fsuintt S| AIM: Gu 0 cas, named Brinton! of vecions vamos of did types ty cating diffe eat, funchions with the same name having. osa- CODE ! class priv} oct pY— data (self, list) : self. list ~ a det py - dota (self , tuple) : self. tuple = (> print (tuple) det py _ data (self, str): Scie paint (stv) P = gint OT( 9 a (C:,253)) (0, [814 6], mouse ) Sample Ould * 01,213] Pa”, ceued, * mouse 2 amit GL AIMS A sludlel fiom semist has bis] hex moray defosited 16,000, 39,000 , 40/000 » 4y hanks - cuB, HFC and drdav Bank wuspectively CODE ; Class Banks — seMisT det get Balance ¢) ! relugin 0 Css ug (Barks _s@Mist) det get Balance ( balance ) : Helusn balance Class HDEC (Banks . srMist) det get Balance (balance) néumy balance closs. Indian - Bonk ( Banks samist) + det get Balance (balance): netusn balance Ks_ spmist (9 CUB, go Balance (1S000)) HDFC. get Balance (30800)) fan Bosolk, get Balance (40000) a L}AIMS Guile a Tindale and ‘witoline it with Loss ard mines - 1. Make a muthod adding whith shoul fake two time object and add thin: lo. Habe a mtthod display Tre which bhould prunt Ye Line - 3. Make oa. melhod. Dish on whith Sold di teal minutes in sit or CODe : Clo8s Tine (); o ae (self hows , nuns) ; Self. foe Pouss SAE. ming =) mind det addTime (41, ae rue Time ( (0, 0) id minseey eves, ca 1. hewt - (1. mins + £2-mind) //6 0 £3. hows = t3 hows 441. Lows + 42. bows, 3) mins = (th mins +42. mins) % 60 tet usr 3 displayTime (self) ; “Tiere 18), self. housts, "powts and", self mins, * minates » “) ‘f, hound *4o + selt. mins) LL 16 point the asta and pouinnelen oh a toiawgle frosting sides of 34 and units (stool a (oss named Giang an and will, fundion fo prunt the area | CODE 3 class “Hiangle : det find Reaimeten (self ,s1 52) 53.) netusn (sits2t s3) det find Aneo (self, 5], 2,53); pe(slts2 +33) 32 plo nelusin (se (s -s1) “(6-52)” (5-33) nas > dat (imped (“érten the fast side of the triorale :°)) =Floott (input (“Ertesr the secorel site the huongle loots (input (“Enter the’ Histd aide of te tuargle: ) Dangle ( ) The penimele of the trlangle %s fo:, asy, imeton (sl, s2) 23))) format a. x totangle ‘ ‘fo ay Ffonmat (ur tind Aetea (s1,52,53,))) Sample Oulput : Evton the. foot side of the beiangle ae cn tle s0rd site of te tory <6 enter the thitd ade of be taangle + 4 de pesameley cb; he ‘buona & * 13.06 The area, a triawale ASS

You might also like