You are on page 1of 5
def string test (s): d-("UPEER_ CASE": fox ean a} if e.deupper(): A["OPPER_CASE™] 421 elif c.islower(): GI"LOWER_CASE"] #=1 else: pass print ("Original String : *, 5) print ("No. of Upper case chazacteze : ", d["UPPER CASE"]) print (Ne. of Lower cage Chazacteze : ", d["LOWER_CASE"]) \, NEOWER_CASE":0) File Edit Shel Debug Options Window Help Python 2.7.10 (default, May 25 2025, 68:44:00) [MSC v.1500 64 bit (AMDG#)] on wi + 32 ‘Type "copyright", "credits ox "License (|" for more information. >>> RESTART doy string_tess ("HELI How ARE yOu") (original String : *, ‘HELLO How ARE you") (Ne. of Upper case charactere : ', 7) (Nc, of Lower cose Characters : ‘, 7) print "To Find Palindrone Numbers" Gef Palindreme Nomber()+ n= input (Enter Number to check for palindremes') a=0 while (m!=0) + a=meiosasic mon / io se(n == a) print ("8 de a palindrome munker' &n) else: print ("84 de a Perfect mumber! &n) Fie Edit Shell Debug Options Window Hela Python 2.7.10 (default, May 28 2018, 09:44:00) [MSC v.1500 64 bit (ANDES) on wa 4 222 Type "copyeiche™, >> Palanazone Sumber () Enver Number co check for peiinaronse 221222212, 13222121 a2 a palindrome number To Find Falindrone Numbers >>> Palindrone Sunber () Enter umber c6 cnec Tor pelinavonse 17365 “credits” or "License ()" for xore informacion. ‘RESTART RESTART peine'Io check amnetzong numbex” pum = int (input ("Enter a numbe: eum = 0 cemp ~ nun walle temp > 0: digit - cemp = 10 sun ++ digit ** 3 temp //= 10 Le num == sun: Brant (num, "13 an Armstrong number” eee: print (num, "is not an Armstrong number") ™” File Esit Shell Debug Options Windew Help Fython 2.7.10 (default, Yay 23 2015, 08:44:00) [MSC v.1500 64 bir (ANDG#)] oa wi + 232 ‘Type "copysight", "cxedize" o: "License()" for moze information. >> RESTART To check armstrong number Enter a number: 370 (370, ‘1s an Armstrong number") To check azmetrong number Enter a sumber: 124 (G24, ‘1s nor an Armetrong number") RESTART Pring Wee eeeMRERVeeooe™ print "i= Area of Square, 2= Area of Rectengle, 3+ Aree of Triangle” input ("Enter a Choice") Af are (print "You nave ro find the area of Square....!* npuz ("Enter che Lengzh of Square") print “Area of Square= Side x Side =",1*1 suis a2 print "You have to Find the Area cf Rectsngle. input ("Enter che length of Rectangle") bvinpus ("Enter che breadth of Rectangle") print “Area of Rectangle = tengch x Sreadch elie a= print "You have to Find the Area of Triangle keinpur ("Enter che breadth of Triangle") heinpur ("Enter the height of Tziangle") print “Area of Triangle =1/2 x Sreaatn x Height =",pen/2 print” ....-Thank You... File Edit Shall Debug Options Window |Help Bychon 2.7.10 (defaulc, May 23 2015, 08:44:00) [MSC v.4800 64 bic @NDE4)] on wi | Type “copyriahe’ = Arca of Square, 2- Area of Gectangle, = Arca of Triangle Enter a Choise 1 ‘You have to find the Area of Square....! inter the Lengtn of Square 5 Brea of Squares Side x side = 25 area of Squaze, 2° Area of Rectangle, o= Area cf Triangle Enter a Choise 2 You have to Find the Area of Rectsngles...! Enter the length of Recrangie 5 uncer tne preadtn oz Rectangle 6 Brea cf Rectangle = Length x Breadth = 30 > RESTART i= area of Square, 2= Area of Rectangle, 2 Area cf Triangle Enter a Choise 3 uncer tne Dreaden oz Triangie § Enter the height of Trzansle 4 Area of Triangle ~1/2 x Breadth x Height ~ 10 shank Yous. -+ Ncredits" or "License()" for more informacion. RESTART print "To find Simple Interest” amtsinpus ("Enter the Amount") yeesinput ("Enter total number of years") AE yre>a2 eint "Rate of Incerest = 108" ° else ein: " Rate of Interest ~ 158" z0i-15 sisamt*yrs*roi/100 print "Simple Inveress = ",st File Edit Shell Debug Options Window Help Python 2.7.10 (default, May 25 2015, 09:44:00) [MSC v.1500 6¢ bic (aMDE#)] on wi = 332 Type “copysicht", "credize” or “license ()" for more informatica. S3p secessceeecaLeaccecccaesccseaaae RESTARD Seeeessnesooeesanssnneaeanaaass To Find simple Tnverest Enter the Amount 10000 Enter total number of years 10 Rate of Interest = 155 Simple Interess 15000 >>> To Find Simple Interest Enter the Amounr 10000 Enter total number of years 15 Simple Interess - 15000 RESTART

You might also like