[go: up one dir, main page]

0% found this document useful (0 votes)
18 views13 pages

CS 12th Short Notes

The document discusses various programming concepts related to data handling, including stack operations, file handling modes, and writing data in different formats. It covers topics such as opening files, reading and writing data, and using libraries like pickle for serialization. Additionally, it touches on Python functions, arguments, and database connectivity using MySQL.

Uploaded by

hk7611887
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)
18 views13 pages

CS 12th Short Notes

The document discusses various programming concepts related to data handling, including stack operations, file handling modes, and writing data in different formats. It covers topics such as opening files, reading and writing data, and using libraries like pickle for serialization. Additionally, it touches on Python functions, arguments, and database connectivity using MySQL.

Uploaded by

hk7611887
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/ 13
Urea Dolo Suchuie— cohlatn Values sequedttally ov Jtoeosly. QF Stock 'Owk end de open gov ent 2 eutt of dota Y works on LiFO C Last tn brat Ouw)~ ekement endured tn shade would be 45 yo be xemoved. Ralnts 1) etement of stoke 2 Vadovado command, when no more etemunk Can be purned 0 eChemend dua Ey dek Pop CHysteck, spt f- def Push Chystocks, sp, ete) # W spe=a: Sp= Spat PrtatC Stock Emply®) Mystack, append Cede) eke’ prtot C'stack Pytatets, 3p) Patek Cuystock.popc)) Bebwin, sp Sp=Sp-4 Stock-C1 PrtatC"se™, sp) Lopele=-4 Bebwg sp x= Tat CEnput Center element") Bae ; SEs tepiele = Push (Stock, ‘opel, ete) etre Cie Tics eshow top ebement 1 ‘ lateibermenoosingy Jeq- del Display C Mystack, sp) Ea- def Peek CMystack, sp)? eee WU se==-4¢ pala C8 Sto ok . pict C'Stack Emphy") ehset Sess) 8 Rab prtot CMystacks (3p) Be, a4 Mystack) ecke Stack=04 Nopete=-4 topete=-4 | Display (Stack, + Peek CStack,topets) ee Oe) io ermgrsties GLE WAN DLING - Basie TueoRy File — named ocabten to store some tatormation ov dala Organtsed in specitte, formas 2 remains In computar's storage devi Sov Suduxe urt. DATA CLES Modes OF OPENINI " torte mode ovenwitics th Cite emshs othenwtie ate "| ortales estan Components of Fat PEWUE 7 read mode only. AF dala doent exist shows ooan CA Use:\ Cows \Noma docx |__| Stout ade ot ee a JA append mode IF Ste evisls, atcten 15 As Dost Regt folder — whith vs | ot ents, 1 esben new feu OOS” © Sub- Selden — « =r |reod suste » €tte at o Calden Paes aa \ ye09 Hen wetle . Inks io plocid Ficch- ete SSE taj, PORPRDRMEIYS nef ctl vot Caden 2 hous Devel one above of every Poldey ko veach Specifred Coty WRITING Dera ee oy Num = 06,45) 19,129 Pictsle -dump Gum, f) F- chose) import pichle £ =open C "Sadat", Bec= for ata vorge 3): ienport pickle Feopen("Sam.dat', & s- Fweopenc! ramet" "w") Sor a fn ange (x): nym = Input ("Ente £") Sorwetle (rma Nn) $PPSRORME> yeoin nome of GULL Feo rchosec) welusin mode of Se xahunn Thue if closed otherwise Falce| . ) oq oh SUL exta + APseekGs)o sob Cele potnlun ; = ad 5 byte Peon beginning TCH [ad Beginning of Ue ad end of Cte ~ Progam madute Used dimuttantoudy ot daPocdt Un a PHogram to perform Apecific Jark RULES FoR netonces UE | oloegin wills ‘duh! Main Sune named Porantherc, (), Je erd uly colon sCu0e) math-sqrk) meth: pi) eb. Suse yjuord Funelion Block jeFunction heoden- def Types of Arguments a) Pastoral oxguinest— Pwovided In correspond Orden to ponameden, cE G- det vatumeCa,o hy! clast stalement funchion loody, eno Stalement ail! be, eecuked agbor Unie snot Compubacry econ be for mushiple volues— retusin(a,'o16) evetums Vatlur te Mode Jo Function, owieg vebuun Slahmed 3 wrebusinable © othenwises nen= Telwinable Pundion LOCAL SCoPE ovauiable dectared ukttito the Fund-on es be nebrided oubside scope Ey def display Coame, oll=2' Nole~defautt vatur don't come before ron- degautt volut ) Keyword cx gument= ov Fundhien. You name axqumest that ° global Keyword-helps | Can be provided in any aol} Order. &- deg Yol CL, b/h)? SG det Cates): area= ss PrintCar én) Febwin racion Sisnatue 4 | Format Panomels § = deg Sum{ab) DArguments/Adauat Ponamelus Vakues Powed to fun While Calling © sumCx,9) evantiable declared Outside Ranckion body 4 HOMEBES Con be Used Arvioughoud ine p¥9Scam G4 otol. de sont): pean gtoba! rum P CONNECTING With PYTHON! WOH) — Hecrive : sienport mysql conneckey gockge, dalabare ,atow to Oney wit, Connect () Fan dion Bec te He For og import mysil- connecter oo mycon KOUMA TY Aob | > = .consey() ae Ktonned-avdaj >= mysq}-connectoy conn et BU — 19 execs qu Vnost= Ghost name, ; Usen= = . execitr ( operation /ay O cursorc) > « execute C* UPDATE <> Sct ; DELETING RECORD Comntcd to Aytnm = =@ coral) |B Ge, da not £8) Member eto, dt in = ANO CS) ORL) wor(~y > Pou) poula,b) -a saiud to b son CP) 3 ey «ound Cn) Hound off He 0% obwoas Flag J import Fandom "Ta aot ro: btw 0.0216 dom -sandiat(stort, shoe )-vondern no. Bander: Yordronge Cchosd, stop , step) Pe DT Tyron Revision Basic - Cuass ug at ‘ Lompound Slalement Sd og slatements | Jenigd under some Lfock out Slatement — statemenito execuled on given condiion * CUAL Shokement—Slalemenk executed if condition us falae. CE statemunh S4 = aes new condition ofan Hoan urden i! UH stotemod vs Salw of Sirst Looe Hae while Loop ua nat execued. : a (is uated ane ep e S1RNG 3" | wi MP chap + innen| OForward Indexiny— ghaut Romo Loukn ikexation dlucation } eBockwond Wrderiny= stastd Som -1 Wd= " PYTHON" t Print Cud (251) = PYTHO . Oncens Q= Input CM Enter") Foy in wd? net ee) nt (wad *3) -PyToney: ° cid Lath io? iaarmimenami (He Free print evTHONs"in “PrThad PROG') Tray *COMBSAGHON adating shins rink Dats teh Dak tealphaC)~ out chanac. are at = See an aKing “WSBUGHO= ARE ch ow dught *HewbeitPe Same os ts + isokoum()-aer oh on alpha iM = Sane 04 abring i ovdigit — f, Salwar) alt dy any Jovuienre | Aeidenaive some ay asbeng ousugpenC) = Lt dh omy UfPercon | e/lnpud — stowed conved to Rowereae — | ae gal Cingul C* Ender 4ust)) supperO) ~ Conved te Lepercan sate, ; <> ZapitatieeC) ~ oly 3 Detter upperont ae ee Kommed Wpud in Dit if So HRRLC)~ 1 Letter 06 each urd Upper Inpuk Us wittun square bnackels “2 SeoapeatO)~ ower In Upper Lu evephace ald, nusdvegtacr Hat word foMAKC) mint) - te Gnd mas & min no fied Csubste, slorterd)- Grd tru und fr BenO= te know tery sSaspest)S chaci iG coevih eputn [7 fPdO= add ekemurd ab end opevatig a tt Othe | + count (subst stad; end) PITS EER C= a) ict to 0 24:4 40 Com a th + Under) teats Mra index ob ¥eQuIVed vo. *POPLI- deteler 1 displays He element cimentetndewele)- add clument od specified tadex jp Yenc) rewoues element of ist pager? ©) SBS BO iceairg codes “or and elenend Send) 5 tndexl), maxO), min), 6 Mees. y Kefautt Gk remove of oth inde eo dat Keyword to delete tuple | CountO Gteades a rut Ust by detwirg + SoledO-in Orcending oder Lc oats “haptic enea hol Hes ote mC) 5 courtO) 5 dete) theytsvaturt bey 7 Fl for a Fete" ect Print Co, Nt vesuut of) edenl) , pop, S : ° echean()- te date att pain Beoulk Duy] = y “ scopy (= Fo trae & Neen : a fo View att Rey as Just fe vides att values onus fo Vitis olf pala ostugte » dasabore cis CollecHon of diCaunk Jobles suc Mat ep Bada in Hae Farm ob stows ‘olurnna, Dolaore Hanogement Syslem COCMS) vs on apphicabion packar HGoba ‘Wn andecty manner ao thal wfoxmaian Need of DBNS estuchuned scan ©) add naw daba@D duplication of datal @ x omodity data con be ddeted D dour Guvues stom relieve, data ROSS CRetational OGNS) suses a Stelabional shuchue abtouiny to dendity date from dit tables MG, Canmmut based on _unique key Sel. OA dada Quay Lenquage “TERMS iy 2OGUS ‘vind ha” Bifeoales) — co\umns OME - Pala Honiputation Language # Degree: ~ No. of abhibule, Ginseds update , dato, moge JeDUL- Pala Conkvak Language — nights, poreinie SQL Cotnmacd4 SDBE- Dolo Definition 4 Greate, Allos , Ovop Rename BRIE U byke of storages rorge (unsigned) LGIGINT= Uplo @- bytes 42 Mf [ORIEN 4 A. ode00as peunts IDEIE - YYYY-MM-00 , Range - \900- 9999 -\2 @ QHARGH) — 9 42 255 CH). 5 is Fixed co xe Me spottashithes Rilled ov not T= Of ESSE © Doan} verve COMmENTS enct © oy emply space. eo ® operation a any no: With} rust veka In nut ek Contams Spee CONSTRAINTS ‘ @ WONG Wot choutd not be rut ® defauw Atoting dome, Valu by dehautt 3 Unigui- dota Ahoutd ret be duplicaled Rrienoiey Kay decton prumony Key Cuct Nutt + Unique) @ Gowigutey - dectarr Coreign key §- Guat databore Show databaas | Cuak Tale Cable snd 2 dadaboresf C Kcotumn sist>: far et Watues (4 9, 9, 393.) here , G><3 - et Jonuany = 2 “Bio NEW TCOLU ENS Alter table Modly Ceol nirip dada type re Pitot Sable < nome a8 Ceca rom Comba tyes Gish Zager ln 5 Fores cs cone Y- Use Hydatabant s Ca Plier Table Emp» Bad CPhnto vorcronlao));ff Debute From Retuting Cosumn Oh Dist caw Seklteh distinct Foes < e 5 Cow. toesxa) DQDUNTEY- Johar rv. ob record Seteck % Freon a COUNT Kcal amd) ~ fatal re: 0% Values nm co Ode by Sokosy, » MIVA — fount vatuc @ MAK CHa Gkour BY mi D DUWE)— total sum avalurs ® AVG (s- Ave. “ato Combine ecm ENSE ATC URCT) ‘Tata! From wevby j 5 % tekle havi idewheat 8 BeSihicl oV4( Fee) “rouge hee’ fron obj Waluerdn specified Peld = AS Se sees Bair momey 5 Grom <)>, =) <> = yO mE PD ve prud exody gS Singh chonadkn. Trdunns “wrk commen by lool tololes % From
Tow Teco of left table + Fecord Common ween of wight table + con

You might also like