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

Python-4 2023.10.29 - APG

Puthon nate Al

Uploaded by

sadisadamruwan5
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)
34 views

Python-4 2023.10.29 - APG

Puthon nate Al

Uploaded by

sadisadamruwan5
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
You are on page 1/ 8
Nos Date: 2410; 2023 aed gemamesl AQ BAecse. 6Rg20 Bef 220038) Beh georraud a Ba 6dBuod Bro FS gms keel cel Reeiicl 8950 cqaanssa” \’ (back slash) ofr me cans. oe = a Babess. _ = Freee - beas\ ee a ee _b+\ totals as \ 6. — z _b\ - She"my \ — - wo L: Schoo\"" print (botal) \ print (+) _ 5 _ _ print (54) _ 15 J ts et, cals bein Schl €8 6m299 _-Quotation 220% Dbace Hci LOO ca com Ben 268.302 2G 2a came (°) 80229 cwi29 (°?) 8419 2 coma (*?” ot” 5) ve@s eae seas - |e 84 wa dhapara! 7 "" This if a Paragraph It iS made z | " Sentence" a Up of maltiple: lines and sentences! "4 print (6+) _ wa2= "Student's marks!" print print Antradhapara giwi print Gdo). Sentence This 16 a pacagraph It iS made | _ Up to multiple [ines and sentences _ _ faded’ marks * print C'cat') = print Cicta® 2) leat tang print Cr" mty! K print ("" my\ dog") dog") My! My_dog dog |" Date: —/—_/—___ | Bp bbe = Comments. APE) en — —— is REAlyn Be Bilder 602 VBS arp me Cone Ptr a kl python OB 21d cdBaald Pn ch odBasel edlpes Babbrs + ble ca qoawen i — eeu] | epeman Geng ‘gakwal_ard 92 gman Bbes Ga cela cblo 208 om _ __genn spell ereG§ abd ___ fas | —_ Be First Coment _ f=, - a =i B programming Hello _ —| eel print C7 ello, python!) # second Comment Helle “Python - — Bee BBA gol gems BO Rk BBs2m0 Aawloain_aabyh vbBead gua sex) ME cosa e068. _ 34% = int Cinput “Enter numd +"). 4 > Float C input C* Enter nam Enter naml + 6 nme inpat C "Enter name + py ee ee fo ane be dt Fem tg = Ente name? Ronit _| print Ctatal 16”, +) _ total is 4.5 - prink C* sone ttn) name 15 Rani - Been % ao! gpl g626 __-Variable Types ; ; = _ Xleounter = too - m 2 1000.0 100 aa [name="JobnY tw laged = 20 _ y+ 29 ee = = sons ager > "30" a 302 - anal es Counter) _____Jehnh _ 1000.0 as print Gn) : John <2 lasrat (aget +2) UCN __+ = print Cager #2”) a a print (name,m)_ —— print Gramé); print Counter) Atle: Date: Sap ~Lonect ~Conect __= Error 2,22 ~Conect ___ &82m glo ghee - Standard Data Types Numbers = 0980 = see Bh + Sting wale + List -_@ckbabep __# tuple + 208 cals A Data Dictionary - goo afgcore # 50k _ 2 Python Numbers fxtVI 212 > int (Gnteses- de) bV2=10.5 > Float Cena. _____ al eB ge? Gaex 2em Qo mbo edn 2800 gap BB gon obiss _legenmBS enbics® oe.» _sPython Strings - sale _ K melesel cy Pe pias pitgendizp emer, Str Hello worlds | > malq38 Dal Bel gana sagm som gehel 4, 20 @D Gis TZ . ae prin (Six) Hello worldf print (54009) No:. eke Date: __/_/. + print C54 (o:7) ; rint (sty [221) : pri 5 he = #pri Mow gaye. sll reWorldt - a a __| sprint (Gh Fred) tprint (oh) Hell Hello World| Hello world § ” + print Gre "testt yok belo tsa prints Gtr fi resr" Jus s (Hello Woylal TEST Hello World| TEST + pint (anes No oatpat — — Histra = "Hello python” Hlel itt lo Pl ylt ‘ : 7 1 alaeles |e by [2 |s/4[3 ab +print Greate print (tio-[4:7D. ___|o - lo + pint (sn [-a:)) xprint Gira L-6 221) b Python - No_oatpat | - vie "Hello Worlat! a eg Opcies V2="Python Programming” coer + print C" viol: ", vilo1) print C'vali:s):", va Cis) vife] 2H - V2 [1:5]: ytho . “Ke lyal_="Hello world)! a — print ("Updated string = "val C2414 “Python! «= | y Updated String £ Hello. Python oe —=4 4 Date: —_/__I. — — * Escape characters _ _____ t aletel_ ae 22 _npte ofmsed eon Gadd Be ow on. | t\a > Bell oy Alert *\b > tack space Lt \n 3 ven | n€ *\6 > spece Not working + N\k 3 Tab ei sin ae Socee 6 pnt Cy P5\b thon") ¥print Cty \nPylhon My Pthon - my _ ss : Python & print C "mg P\ngtho\bn") eprint Cimg \bpython') — my Po — Mu Python | 4 |_| Banbel Format i Cherecher | atl and ane aaealitve. 1 Lp ws . | String maigaal aed able | ~T | La | Soheger | Ae sdro2d tod ab | he ectal | adb2us wop2d edroel EX Hexadecimal BBurce 209059 Crs . ae Float 203890 aia Bod>> 1.20 £204" 120) ‘ | Nimal . 20 t i = . | ite. \ a | ALb= 129546 7 prink Cote valid must be 2: af or higher" 1.0 wo). { ‘The Value must be “19,236 or higher : | +b = 12.76 - | privt C'The vole must be 7% ch aes 7b) Se = — | (The value mast be 19 ov higher — el | 7 ; — | 10 — it. aa a | | - 2 tlprint ("2X 2.31) - ¥ print C" hae” Lar) | fe af 1 | a Ak = = f+. a 42.5) ) - Mimalps Average Mark i5 _ 82,50) °~ Te 1 - ame, nani" inet, a6) | Markt = 63 sib tases _____+ 0a cdeb BBQ__- String Split ed lax oblaed ada ddugZe cOASBID Split Gorse DF 2064, pared klStr = "my name" mie at 7 as Str. Splitl) pe = print (a[01) - sprint Cad tt my _L'my', name! ) int C " poe) alprint (2.011 +print Calo," pet") ham é My Pet _ —4 Alas #\b= 122346 eb = 12.716 __ + print C*Z 0" f-10) 12 +\print C"ZX2 231) | fics Nias Average p— heel print C"The Vaind mast be , print C'The value sonst be 7.,0F 01 higher The Valne mast be 13 ov higher a a ’ af or higher” 1-(6)> The Value must be 19,095 oF higher al print C’ hae" #1) Ap sds est print (*h108°S Average Mark (5 %io.28" % Crimal! 62,5) ) rk 16 69.50) SS } i | | [ a= Str. Splitl) 4 print (%00%205 \hi2057,203" 1, (Home, ‘marks inal’, 483) Nama May kat ol = = —HNimaly 8 Pe | eebey cde) BBD - String Split mas wblacd spas dduzpd $B\SB9D Split Qa eon 2063, print (a.[01) eprint Cad my Cmg',!name!] sprint (a 1) hame _tprint (afol "pened My pet #5 "My name is himalt Ha = Sty, split” ") prin) (a) ‘name’, i nimal]) Date: II. ta = lr. split C'n’) print (a) Ling ' tame 56 ', imal’) Atlas

You might also like