?python? Short Notes (Part - 3)

You might also like

Download as pdf
Download as pdf
You are on page 1of 7
SHON Tee ye Alheat te Python? > Pyrnon it a high-level, Interpreted , Interactive , and Object oriented scvipHng language. Python is designed to It uses English KeyWords Frequently be highly yeqdable Where AF othey languages use punctuation . Bool True, Folce Set aie . ct ae essa Seqence bist We C2,'a', 5-7) Tuele €3,4.5,'b) NOTES GALLERY (TELEGRAM) _ [we Psvanroges & Disadvantage’ Disadvantages * flow dpeed Fiduantages Nor memory eFAldent © Lmproved produutviry * Pnperprered language . Harmbace Access. « Dynamic Tyred Continue —> * Free & open source * Runtme Errors: * wast Ubyaries Support * wleak in mooie computing. & _Hetlo, world fn Python > print (“Heulo, wortd!”) Output i- Yeo , Word ! ATUL Korn AR (Un KeDUN) - NOTES GALLERY (TELEULAMS = Or. A loop sfatement allows us t0 execure a gtarement OY avoup of Jrarements multpte times. TYPES OF LooP = Repear q spare —menr voniie @ Execures a sequence given condition OF srarements is poue - multete times and States condjHon before exeuting. yuu can use one/more Joop inside ang orher Qbbyeviares code loop. thar manogyes Loop Variable. ATUL KUMPR (LINKEDIN). fen (02,8) CHT Fe TH Wir, | Repetition | Rr x in (12,3)! 12,3 Herarton Print x, Ps ok NOTES GALLERY (TELEGRAM), # _Purhon Decision Making = Kw Loor Steremenrs: - ae a ATUL Kum PR (LINKEDIN). Tuples vesponds to the t and * operators. much Ike ‘shying.’ then they mean concatenation and vepetitton here 100 except phar yesult 16 Q new tuple nor a string: qn Fawr, ruples yespond to all the genesa) Segsience Operations we used on Strings. Sun! s_syovg vs th On Unite Other Programming larquages, Python pywides the Fadlity tO execute the code using fet lines. Tn Jova , ir Win take three tines to printit. I] Cede in Java: Public clacs Yenokdond € Public grate veld main ( shying Clavgs) £ System. our. @vinrin (“ yeno , world! (es 2 On the other hand, We can do this using one tine . FF Code in Bone priat (“ yeno!!”) eer #F add a lay]ual + deites ko votes Chtue d= #F change vatue ATUL Kumpg (UNKEDIN). fora =3 *3 +e Ourput 14 ada ee 603 ae puree ATUL Kumar (LINKEDIN), NOTES GALLERY (TELEGRAM) w Teles :- + Adds 100 fo iirt ATUL Kumpk( LINKEPIN). INTERVIEW QUE. we what fs Score? > Every object tn python funuttong wlthin q scope. A «cope 1S @ bioek of code Where an Objet In Python yemalns yeleuant. Namespaces uniquely ftdentify all the obsets Ynside a program. CUS e tC these namespaces alsO have @ Scope defined For them where you could use thely objears withour any prefix. A local scope vefers f0 the local Objets avaliable tn the curvent function. A glowal scope veFers {0 the objerrs avallobie through tne code execution since thely tnception. Pr module - level scope wvefers to the global objets of the current moswe accessible IN the progyvam - fm ourmosh scope refers to all the bolit -In names can abie in tne pregram - The obser tn this Geope axe Searched last to Find the name verFerencd - we inat are global, Protected € Privare Ottylbures? P+ Chobal variable: Global \Waviebles defined In The alobal scope the scope Inside a finufon (De use Global (ceyword. ave pubic variables thak are . To use the varfabie in Prorwed attripure: Pyorered ativibure are abtytbures defined Lolth an understore prefixed t0 rheiy tdenHFler - Privare artyibure nloTes GaLLeey ( TELeq enn) eee Private abtyivutes ave attributes With double undesceove prefixed fo tnelv fdentiffer. 9. --arul. Pheg cannot Joe dice ees / moaified From the ourside aiyatny and ot vesulh in Arryibareewroy TF Such an attempt it made- ATUL kormnne( LiINIKEDIA)«

You might also like