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

Complete Python Handwritten Notes

The document is a comprehensive guide on Python, covering its features, applications, installation, and basic programming concepts. It includes topics such as data types, control flow, functions, file handling, and object-oriented programming. The content is structured into chapters with detailed explanations and examples for beginners and experienced programmers alike.

Uploaded by

anjish kumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views65 pages

Complete Python Handwritten Notes

The document is a comprehensive guide on Python, covering its features, applications, installation, and basic programming concepts. It includes topics such as data types, control flow, functions, file handling, and object-oriented programming. The content is structured into chapters with detailed explanations and examples for beginners and experienced programmers alike.

Uploaded by

anjish kumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Dats,

GOMPLETE NOTES
ON
Python
Gopyright by: GodelWithCurious -Com
Instagram: @orious-proqrammer
leleqram : QCurious-Coder
Written by z
Damini Patil (CSE Student)
deat

Sr-No
Index Page No.
Chapters
1
Thtoducion
11 Ahat is
to Python
python ?
12 Features of python 1-5
13 Aplícations oF python
1-4 Fython Installation
15 First python program

|Modules, Comment and Pip


21 Modules in python. 6-9
laa Comments in pyihon
R3 What is a pip
| Varidbles ,Data Tipes keyusords Operatos
|81Variables in python
31:1 Tdenlfier in python Jo- 20
32 Data Tjpes in pithon
33 kewords in python
84 Operators in pathon

4: |ol, Dichonat [Link] . Tipe. Canversion 1-25


41 List
4 Dichiongry
43 get
Data.
Pagt

Paqe No.
SR No.
chapters
4:4 Tuple
45 Tupe conversion

5. Flow Corttol 6-33


5.1 If: statement
|52 IF- [Link]
|53 elF statement
54 Nested i statement

6 Loops
34-4|
ls1'Ahile loop
|6 2 Forloop
63 For loop using_range) function:
6-4 Nested For loop

Shing 42-46
|71Python sting
74 Creatingq sting in pgthon
z8 Shingindexinq and splitting
|78
7:4 Deletinq the string
|75 Shring törmating
SR No. chaplers Ruge No
8Funcions
8:1 Funchong in python 41-51
|34 Crealing a uncion ,funcion callinq
82 Return staBement
84 Scope o variables

9:le Hadling
91 Jrtroducion to fle hput loutput 52- 54
94 Openinq and dosing fles
|93 Reading and riting tert files
|94 Wbrking with binars fles
9-5 Erceplion handling Tn ile Operations.

Jo:|Oject Oienled Prgumming (o)


|107 Trroduchion to 00p in pyhon 55- 58
1o4 dlas_es and abjects
103 Conshuctors and destructors
l|0 4 Inheritance and Polgmorphism
|o:5 Encapsu lation and data Hiding
D6 Melhod Orevidinq and overloadlíng:
11 Erepton Hardling
M totroductHon Exrertion tandling
11:4 Exception handling mechanism 59-61
(13 Handling Muliple exceptions
114 Custom Emcehon
115 Eror Handling stoatcajes
classMate
Date
Paqe

4 Introducioh

hon
IAhat is puthon ?
1 Jdhat
Pythan isa qeneral -purpose., dynamic, hiqh-leve.
and interpreted proqramming lahguage
Tt is desiqped to be sinople and easy to learn,makin it
an ideal chaice for beqioners One of the keystren qths
Of Python is its versatility
Python suppatts the obiec - oriented proqfamming approach,
alauing Hevelopers
and redsablecode
to ceale applicatibns with ogahized

Readabilikyi-Rthonts suptax is desiqned to be clear and reusob


le making H eass forboth beginners cind experienced praq
ammers to understand and write code.

Simplicity =Python emphasixes simplicityond draids complex


Synfaxmakíng it edss for learn and use ampared t
other pragiamming lanquage
Qpamic typingPgthon is aynamically typed, meaning you can't
need to explicitly declare variabie. pes
Copgrighted by Codeuthcuviots -Com
elassmate
Date
Pcqe

Latqe slabdard librars: Pathon prouides a vast sBandard kbrcuy


lh ready-ta- ase nodulas and funcions for variousCammon
Hasks,
Saxing developers time and effor in imlementing
foncianalilies
Ohjec - Orienhed Rrogamming (oop) :- Rathan suppatks he objec
-oriented praatam oing paradigrn,allauing fat the creaian
and manipilatian of obËechs, classes and inberitance
Coss-Platform Campalibilty:- Pyhon is avail able. on multple.
platforms, incuding lindous nnacS,and Linux.,making it
highly partable gnd Yersatile.
Extensive Third-Parhs libradies, Pythan has a vast ernsystern
OF third- pdry libraies and frameuwoks that expand its
mpabililies. n ditferent domains, such as web derelapment,
data anassis, and machine learninq
Thterpreked NaBure : Pythan is an interpretcd Ianguaqe,mednin
t does nat require compiaian This resalhs in a faster
ceyelopment cde as code can be exeruted directly ithout
he need far aa sepate compilation step
Tblearation Caynbilities - Pgbon can easilh intenate with
other lanquages like C, Ctt, dnd T¡va,llowinq derelopers
to leverane existinq mdebases and librarias:
1:3 Appliations OF Pathon
Rgthon is widely used in sarious domains
and affers numerous applicaians due ta its, flexibilits
Copsrighted by CodehWithCunious. Ca
cdassmate
Date
Page

edse ot uSe Here are Some key areas where


finds appicaion ythan
Ach deuelopment Rython is exlensivelu_ used in eb deveo
pment tramewaks such as Dianao and Elgsk Jhese framewo
ks provides efcient tosls andibuies to buid cynamic
Mebaites and ueh aplicaions
Dala Analysis and Visualizaion ': Pgthan's rich ecosystem of
Gbraries nduding NunmPyPandas. .and Matplatlib.,nake it
a popular choice for data analysis and visuali ration-T
enables poessianals to pocess manipulaBe. and nisualize.
data
Machine leauDing_ and Artcial Inhelligence Rythan has beco
me the go-to language for machine leaminq_ an AL Projecks
Libiaies hke Tensorlaw, keras and saikit -learn piovide 'pawer
ful tola
madels
Fa implemenling complex alaptithmá and ftainim
Autamaion and Scipting: Pythan's eass- ka- read suntax
and rapid derebpmeht aucle make it an ideal chaice for
autonation and saipling tasks t is commanly used foc
tasks such as file manipulation, data parsinq_and sstem
administiaion.
|:4 Palhon Iostallaian
T6 download and install Pyhan_follouw these ste

Copyigbtec by CodekithCurious- Com


it process
he for instructions an step Cunio
elassAute -arg "Windows_x&6-64 Linux cick
simple
pyhapyout select installer" etselect installation
Obutu excitinq Code
Date your -
the double Herels
a
wwN matchas paqe. box,
executablesystem. onon
follow thehe an ky
falder
folder and completedoseis Cop
at Nindow
lalest
Pyhon_Rxx
relecise. lis intiate
and down 3X pragram
websitethat the
x&. Nindouds enter
started.
Ianquaqe
installerfor either installer Ubantu) drop- to Python Prog1am
_Pathon Releases "Nindous sofkudre button puhoh
choose. gaut the
python dounlaaded
(specifically
souare for is installation
install 5Fitst
Palhonfinst
oFficial andthe
on Ubuntu entrs leatning
qef
to
example
the Python 64-bitor python All Hhethe folder your
For
WindguSthe [Link] 4:Sroll_down Hhethe the
uirements
[Link]
the
the Linux on
8-Locate towards
Writing
VisitJoads/ install OnceCenter
OpenFromTools4xClick
3-On for-bit 5-Run
For 5-
1 1 |R
classmate
Date
Page

5.

# Prining Hella laorld using puthan.


print (" Hello alarld1)

Let's break_ doun the code:


The puint) FuncBian is sed to display the specified messaqe
or value on the cansole
Ih this ase., we pass the stinq"Hello, horld<" as an
arqument to the pint) funchion The shing is encdosed io
dauble quoBeg
The #'sym bol indicates a commert in Pyhan- Comments
are iqnored b4 heinterpreler and are lised to praxide
explainaions or Dotes Ho the ode.

Copgrighted by CodelWith Curious Com


ckssmate
Dste
Doce

2 Hodtes
Gomnent & Prp
R1 Modules (n patbon
Modules prpvide a was to orqanize your code. loqically,
Ihstkad o having al youL cade inq single le, you con
split it inta mutiple modules based on their purpase
khen you want th use the funcignalits frorth a module
ucan import it into your cuntent proarcam or anather
module
This allou)S_ you to access and use funchionscasses
and vaziables defincd hithin hat madue. you can auaid
laiting the same. odle repeatcals and instcad reuse the code
deined in he module
Three main tupas o£ modules:
Modules

Built-in modules! External Mocules User-dekned Modules


Bail -in madules:
These are modules Hhat come pre -installed
o the standard libzans axd
uith pyhon. Tiey are parl op nd
Copyvighled by CodellihCurious-Com
elassmate
Date
Poge

plovide a wide ranqe of uncionalitias Buill in modules are


teadils_ aailable o ule uithat the need fo additiona
instalations
Exlernal Madules :
These ars moules that are ceated by
thitd=parfs ceelopers and ate not patt o the staidard
Tiayealeneled Pyhon's capabiliies by povidip qdditiona
funcionalities, for specifc pupasas Extcinal modules Can
be dounloaded and instaled 'uusing
sing package
package. manaqoks like.
pip(pghan
Popular
ackaqe index)
exlenal nadules include nump4 tor numerical comput=
ations
(Aser Deined Mocuales
These modhales are aedted by the
puthon poqiammers themselves Thes allou) Uses t arganize
Iheir code ito seprcte files and reASe
qciass muliple proqrtns
functionalit
ser-deined radlules can contain functons, classes, laiables,
and oher code that an be imported and used in othet
IPylbon scuipls or moduleas
*Q.2 Comments in Patbon
Cammenks in Python are uSed to pinvide. erplanatoy
Lpotes cuithin the coce that are not execued
ar inhetpreted
by the conmputer Theu are help for impravin code.
headabilits_and for eaving reminders ar explainotians
for oher deyelo pers wbo might work with the code.
in the Patane.
Copgrigbled by CodelwithCurious- Com
elassmate
Date
Page

In Aythan, Comments are denated by the hash Sumbol G


folloued bs the comment text When the Rathan inte
preBer encounters a comment,it iqnares it abd mayes
on to the next linas o? [Link] an be placed
at the end o line or an a line bs themselves
Is imporlan to that commenks are meant for human
readersand are not exeutcd by the Rython inkrpreBar
TherePore, theq bave ng
ho impacf on he pragram's
Runchionaliky or petfomanke

Tgpes of Comnenks
Single-line Camms IMulti -line Comment

i Sinale -line. comments


Sinale-line comments dre used to add
explaibatozu_ notes or comments on a single line op
code. Thes start aith a hash Sumbol(# and continue
until the end a the Jine Anythinq weitton ater he
lhash sumbol is consideed a comment and is iqnored by
he pitthon inkerprete
Here's an Okampei
# T6is is a single-line comment
x=5 Assigpinqaa value to the vaiabb x

Gpurighted by odellilhGitious Com


clAsseate
Date
Page

2Multi-line Commens:
Muti-line comments also known as block cam
ments allau uou to add comments that sam multiple
lines Puthon daes Dot have a buiH- in suntax Specil
fcally for muti-Jline comments, but you can acheiye
Hhis bs using tiple quotes either sinqle or coable)
to create a shing that is not assiqned to any
Variable Since it AS not sed elseohere in theode..
it acts as a Commeht
Here's an example.
This isa muti-line comment.
IF can spah acnmss muHiple line s
and is endosed cutthin tiple quotes
X= 5 Assigning a value to the ariable X.
8 Ahat is a pip 2
In simple
Th simple erns
terms, pip js a packaqe managet
ls Packages
for pugthon It stands for "pip Installs Packaqes' or "pip
instd Paton'
When woking with puthonyou mas heed to ikse external
libraies or madules hat bravide additiona funchionaliHies
beijaDd uhat the standard libxas atters. These libarie
are aten dereloped hy the phon amnaunits and are
available to dnigone to use.
Pip makes Vit ess to install apackaqe, manaqe
ahd uninstall these external libraties IE hlps you
Copyrighted by Codek/ithunious Com
elassmate
Date
Pace

find and dounload he libtaies bu need fiom he Puthon


Package Index (yP),ubich is drepository ot ithon
packages maintained by the Communtty
JAith pip, yoL can instal a package. by ninning a simple.
± wil
oamabd Tn uour termina or cammand prompt
auzomaicalyetch the packaqe fom PaPi bhnd install
it on gauL sstcn, along ith ans dependenciesit
requires

Copgighled by CodehiHhCutious- (onm


elAsSMAte
Date
Page

1)

6VartabtesData ypzs
Keyaords &Greators
8:1 Vaiables in Pthon
Th Pathon, Vaiables_are used to store yalues
bat an te usedater ina progtam You can think oF
yariables ds containers tha bold datq: JWbat makes
puthon Lnique is that you dant need to explkitHy decare
me tupe of a vari able. ou simply qssign a value to.
vaiabBe usinq the "=" operoator.
For example, you Can createa variable called "pame"
and ascign it a yalue like this:

name = "Yadnyesh

Here. "pame" io the Yariable. bame, and Yachyesh' is


Hhe yalue assigped to it Python wjll automatulls decim
ibe he upe of vanable based on the value assiqned
to it

Variables in Rathon can hold diterent tupes o data,such.


as gumbers shings, lsts o even marc. complex objets.
You can chanqe fhe alue ata variable al ime by

Copy1iqh ted by Codekith urious Com


classMAte
Date
Page

|2

Q8sianin a ne) yalue to . For instance :

qge5
age =26 # Updating the value c aqe vaviable

Pyhon alsa alla uns you to_ perform_ aperations on yaricable


"Rr example, you ban add, ubstrdet,mullipls, or divide
yanables ontaining_ pumbers ou can even am bine
variablas o dieent types using operators For instance

Y= 8
2=t The value of' will be &.

qreeting ="Hello
ngme - "Joh"
message = greetinq + "+name #The valueof 'message'
will be "Helln John"

Variables povide. a way to store and manipulate.


data in pythan making it easier to wock with infor
nation hroughput you program- By givinq meaninq tul
hames to atiables, you' can make you cade
tnoie ieadable and understandable

Iligbled by CodeNith Curioys- Com


classMate
Date
Page

13.

3-11 Tdenhier n Puhon


HPython, an identiier js q
g name uised to
identiy a xqriable ynchion.,[Link]., or. any, other.
Usel-deined abject An ideiier can be made up of
Ieters (both uppercase and louercase),digits and
underscorss (-)Howeyer it must start wih a leter ar
dn underScore

Here are Some imporant rules to heep in mind when


alakin uih identfers in python
1 Yalid_charachers An idenliier can conhain lelers (a-zAZ)
digit (o-9 and underscores(-). Hcanno conain spaces
specia) chatacters like @,#,or $
R- Case Sensitiviks : Pathon is case-sensitive meaninq uppet
Case and loweraase letterS are Lonsidered [Link],
Mmular" and "myvar" dre treated as tus dikerent iden
[Link] JAords: Pyton has raseXved words, qlso knoOD
as keuwords that have predefined meanings in the language
These uatcs canna be dsed as idenifiers Examples of
reseved uwords indude "if"Nhile" and "deF".
4 Length ldenhifiets can be of any_length. Howeyer, it is
eammended to use meaningfal and desbaiptiye. nane hoct
are not gxcessively lonq:
[Link]: iss qod praciceta chacse dasuiptive
names for idenifiess tbat conved their purpase. ot
Imeaning This helps make the cae mate readable and
Understandable.
Copyrighl ed by CodehNithCuriols -(om
cAsSMate
Date
Page

Here are some. examples a


o valid identiiers in ptthon
os variable
Count
"total_Sum.
-PL
- Mgclas
LAbd here are sme examples oF inyalid ideniies:
1R3abc (starts with a digit).
- variable( cantains a hspen)
IÂ (a reseLved word)
ns varcontains a Space)
Undersanding and follouing these tules for identitiets in
Pgthon is impartant to ensure clatits, reddabils and
pfaper ibcioring oF yaur
uout code
g-2 DaBa Tipes in Pylhah
Data types in Pgthan tefer ta the diteren
kinds of yalues that can be assiqned to variables.
They dete1 mine, the nature o the data and the
operations that can be perFotmed on them
IAthon provides several butlt in-data tqpea induding
numerid, dicionais, Boalean, sesequence typer
and numeric has Inteqer, Complex Number, Aloat
and Soquence Tgpe has shing-. lis and Tüple
Copyrighted by CodeWithCurjous Com
classnate
Date
Page

|5

Numerie. Ibtcaer

Dicionary Complex Nrnber


loat!
Boolean

pthon Data
get
Gting.
List

Tuple
1: Numerici
Pathon supparts different numerical data Types,
indudinq intcers (dihole numbers), Floatin -paiot pumbers
Ldecimal oumbers).and complex nunbers (numbexs with.
real and imaginars_ parks)
alnkcqers (int) Ihegeks reprasent whale numbeks
withauzt ans ranciona.l part For example, aae =25.
b- Floaing-Point Nurmbers (Elaat) : Floaih- point
Durpbers epresent numbers with decima aint of
traciong For exanple ,pi =-4
[Link] Nurbeks('omlex): Complex Dumbers bave
qrea and inmagingr part o ex: z= 2taj
ulhere is suffix th

Lopyrighted by CodeWith Curious- Com


tlassmste

ADictianar_
Diclianarias_are key- yalue pais. encosed bs
cls braces Each value io associated with a unique
kes allouing -or eicient lookup_andretrieval, For
exahnple. person=name': 'John,'aqe'25,'city;
'Neu York'
3: Boolean :
Boalean (boal): Boaleans depresents tuth values
either Tiue or False. Thes are used for losica aperations.
and conditians for example, [Link] =True
4:Se:

Sels(cet) sets are, ubordered aleclions g unigue.


elements endosed in curls braces. Ieus ahe uset tot
mathemaical operatians ach as unon, intersection
Land dikleengd For example fruits =4'aple!, Banana'
'orange'
5-Seauence Tipes
Sequences represent a ollecHon o elemenks and
nclude data types Hke shing s., licts and tuples shings
are used tostore textua data, wlhile. ists bnd uplex
are ysedto store ordered collections o items
a shrings st): Srings represent seqdences af chatacten.
enclosed aithin sngle dr dauble quatas. Far example
name= Tohn.
b-ListCist): Lists are orgered sequences o
elernent endosed in square brackes. Each element
lopyriahted by CodeWith Curious- (om
clAssate
Date

be of any data tupe ar EXample numbers =1.3l


C- Tüples (tuple): Tuple are. simila to ishs but a r e
iomutab,le,meaníng their elernentscannot be.
changed ance deened Tey at enclosed in 'O para
hesis

keyusords in pthao are Speial NDIds that are.


having speciic meadings and putpases within the Python
JangiaqeThes are resened andcann st be ysed as
Nariable ngmes or idenihers:
keuords play a cucia role in defining the structure.
and bebaviauk o python proqtammers
keyunrds are like huilding'block that allow us to create
onditiona statements., lonps funchions .ç[Link]
enors and perfm other nportant opefations
List of all he keyuards [Link]
False. qwait else import pass
None break excepti raise.
Tue. class inalls is eturn
and ontnue for lambda t
nonlocal wbile
def fiom
assertdel qlobal not uith
async eli or yeild

g4 Opetators in Aahon
Operatars in Rython are sumbols
lopyrighled bs CodewihCur fous- (onn
elassnate
Date
Paqe

characters_that are ased to_perfom gpecitic aperations


on variables and values Pythan piovides varioLs tupes
apexatore to manipulafe aind ok with different
data'tapes Here cre some important caeaoyias of
Lopera+ds in Python
Arithmetic Operatars
Camparison Qperators
d Assiapment operators
o Logical 0peíatdrs.
oBi~wise Opetators
Membexship Operators
oldentfy petators
Atitbaehic C¡etatausi
Authmehc Operators in pyBhan_ gre used to
perfom mathematica balculations on numeric Yalues
The basic aithmetic operatozs includei
Addition (+): Adds tuo operands toqether For SxampleiE
we have q=10 and b= 1d, hen ab eduals Qo. the.
Subtachion (-): Subtracs the second aperand tom
first operand If the Hirst aperand is shmaller than the
second operand, the resul oil be neqative For example
iF we have Q= 20 and b=5then d-b equas 15
Division () : Diides te first apeIand by the cBher.
apernnd and retuns he quotent for exannpleiE Ue.
have q=2o and belo hen a/b equals
oMuliplicaion (): Maliples ane operathd by the aher
CopyriqhBed bq CodelWThqn tous-(om
elAssmate
Date
Page

|9

For example,if ue hare a=20 and h=4,hen axb equals &o.


Modulu's (2) : Retuns the remaincer, afer duicin the.
first apednd bq he second operand For exmple ,iF
Ne bave a=20 gnd b Jo then a/b eguals 0
| Exponentiation (**) or power : Raises the First operand
to the pouer ah SRCond aper and. For ekample
we have a-2 ahd be 3 then q**b equal's &
| Floor division (/): provides the loa value of he
quoBient obtained bu diving he tun operands it
returns he agest integer that is les s than or
equal to the resulE. oexample,e haye q =20 ahd
b s then g/b ecuals G

lComparison Opaadorg
Compaziaah aperators in puthon are uSused
Pd to
Compare uo values and retutn' a Boolean yalueTiue or
Eals)
"Equal to (==):checks iF tuo apeiahds ae egual
NGt equal to (l=)'check it two hprands are not equa
Gieateh than (>)) checksif the le aperand is qredter
th¡n right operand
less than( : check i the leEt aperand is lass than
right opeIand
Greaer harn or equal to( ) : checks if the le operand
is qreater han oi equals to the right
operand
" ess than or cqua tb (s-): checks if
iE he lett opetand
is less than or equas to the nght
Opergi
Copy righted by CodehithCuviousCom
clAssMate
Date
Page

*Assigpmert Qperatas
Asignment Opetatos are used to assin values ta
Variables . Theyinclude
Equal o E): Assigo the value_on the igbt to the
varigble on the let
Campaund assiqnment_ aperato s (+=,-=*=)petforr
he Speiied aibneic opetaions qnd assign the resuE
to vaiable:

Logical operakors
loqica aperaas Boalean ore
in pthanvalues ised to perforn loqical
operatians- on
logical AND (and): Returns tue if both opetands are tue,
otheruwise false.
Loqical OR (o): Rekurns tue iE buth ate gne of hem is true
ohetuuise false
-Logial NoT (nat): Retans he apposile baslean yalue a
Hhe operand
* BiBwise Operators
Bihuise. opetatais petfa1m cperaions on indivslua bits af
binars_ hutabes
-Bikuise. AND(¢): Perfoms a bitwise AND Gperatians_ on the
bibary represenkaions oF the aperands
(opyriqhted bs CodethCvious Com
usse

21

Bilwise 0R(): Ferforrms a bituise. OR aperasion on the


biras repESenka-ions oF the bperands
Bitwise XoR (A): Perorms a biwise exclusire. 0R operation
On the binans represenalion o the operands
apetandr
Bitwise complement( :Ihverts Hhe bits cf heoperand to he
Left shift (k<) :shits the bit o the Jef
ef by the number f positions cpecified by he
right operahd
Rigbt shie(>>) shifH the bit of the left opetane to the
vigbt by the nunber a7 positions dpecihed by tha

* Mernbership Operators
Membeship_ peraors._ ane used o dest wheher a value is
amember dË a seduence
In :Returns thue i both opetands refer to the sume
abËec (sequence)
- Not InReturns true i bah apetands co not refers to
he sane abyec (sauenst)
* Jdenkiks Opetators
ldentty OetaBots ahe used to cormpare the idenity af twa
ohiecis
ls Rehusns Tie if both operands refer to the same
obËect
Iels notRcutns Thue if both apetands do not refers to
the same abjed
Copyrighted by Codeith Curious -Com
classmate
Date
Page

4List,Dietlonar set
ahdl Igpe onversion
Lt List

In Puthan a list isa veksatile data stucure


Hhat allous you fo ore and organixe. mulliple items in a
Lsingle variable. Lishs ake deined bybs endasind aa sequence of
eements uithin scudie brackets I and Geprating' Hhem
with commas.
Lists in pthop are otdered callecions o elemenks ubere
each elemet is jdentied by its pasition or index.
lists are mtablewhich mens_ou can modiy add or
kemoye elemenks attar the list s cteated
ist decaraion
Tn putho. you. can cleclare alistby endiosing a sequence
Lo elements wthin square brackets ( ) Here ate a feu
[Link]
hurabers =LR,3,4,5
FnuitsT'apple"," banana", "otanqe", "qape"

Ti this example, we have two Jists. The numbers


list conhains intcqer s, 'specificaly the numbers1,.3,44
Copy righledbq Codewilh Cuvtous-Com
c./,[Link].
Date _ _
Page '

,,,- - - - t t - - - -- -- - - - -- - ~ -- - -- - -- - -
CopJ r~'nte ~ CodewiihCLrr10LIS Con1 I
/ - -- tt-- - - -- - - - - - -- - - ---, ----= -~ - --
Cop~ ri3ht~~ b_g CodeWi-lhC~r ious$ Com
' II h

Cop~ ri3hte b~ CodeWithCun'oL(J · Com


• eJ
ml: inside ano:l:ber jt _.s-lukmeo:l:, c.1:Ea,-b5 l}}Ul1+·1rle levels
\, or cooctAions ood dec1sionlS .
e,
F Bloc.k

SK)p

be exe ihon i-s true,

Cop~ riq nleJ b~ CodeWithCurious Corn


j
-fg
"

q
I qnatber b\ ads 1

~ ress1·on if Block EX te'5si'on / else Block


~
I•
,_,,
Q
c./[Link].
Oate
Page _
c
at
- I

Floul~htt ,i
- I

- I
-
I ffiar.\- )
-
... I

/~ Hl\.~e., I
\ ccndiho~ I\ I
\ / / -~~ [Link].
\ ~3/ /"\
I \8/ / ~ ~'\.
\ --g 1/
\3/
lfoe.. Tr11 P 71'UP [Link],

,,. ,,. ,i,, , /

E-xprnssion/ E:xptess ion/ Exp~ess iol') / Exf>iess ion/


i~ b\ock Else-iF bloc.k Else - W block El-s~ block

~L .L
I J BtoP ~,

S~ntax:
I'
-
if rnndi-hon1 :
. #- code -to be exewk.J i candi-lJonl is 1m~
✓- e\if conditioni:
,, =It coed e -1:o be ~~J ,1 co ndit, ao t ,:s l-aise , condi'ttan2 is !rue •
.,, e\i rnndi+1·on3 :
_,, =#=coc/e to [Link] J condrJt ,condYJ.Q. ,:S -ta}se,,, ({)nd,lJorJ3 is /rue ·
/
else:
=# coJe to be exewle. i al{ conc:Jitlor;s ctre. 1o)se ·
-
Seo e, = 7.5

rint ' Excellent ''


e\ 1 aroYe ;,,,=80 ;
t\nt C' Ve~ I ''

e
I"

_,,,,,.-- - t i- - - - - - - - - - - - - - -- - -- - --
n1 :
e execuJ · mndi-hon1 1:S ,hue.,

e eat ,·tionl co i·hon~ iis +rue,

ion f 1:S fct~e.,


8'Qm e.:

income= 50000
- 18 :
/

for ct loa.n.''
e ·.
for q [oqn ''

else :
tint " o re. no+

:=--.!Lil6.. e.~s;U~LQ..tnLe_:r±:u~~;~~!LL:ruO..cb:___e_ck_.s _i\_ 4h_e_ rn_co_m_e _ \_,<s_8_ff_ '_ _ct_ _


~ - - U - - - - - - -- - - - ~ - --:--~---- -
Cop~t~h-led ~ CodeWi lhCLtr1ous • Com
-- -- -
----- --
___l=--_-g-::;:_-l:oop-s_ __ --
I - -
- -I i - - - - - - - - - - - - - - -- - - -
. .- !
1
. r~+ho1LfJOYides__sev_er_C1l½pe.s_oLLoo ps--l:o- cq./er-
---·-----+lo. d1 FFere~b_ loop.i_nj - nee:ds_:_Jfiese_/oors_ offer_dj FFererrt ajDk
- -- 1_ond __c:ond1-hon_ =_d1e.ckin3_ofip1o_ac.b_es_:_wbil e_oe.rvi ~_j-JJ e_ _sq me_
--· I p-urp.ase_ot-_ [Link]-l-1nj_'9ta±elTienb__1_ereakcfuJ- - - - -
'
______)Jne_avaiJqbJe.[Link]-5-i.n_pj+boo_art:...::~ -- - - - - - -

~----, 1· While_loop : 1±: repm enls~ oL3toup_Q-t_ ~-k-~ent


______ .a_s_looj_as_ a_spe.c1{1..eLCOJ1dJ±i.o_o_t6....±rue_·TheJoof _bo~ - -
----,'. __.i'[Link]-kd_o_D~- iLlb~co n_di±LQ~is ___eval uct+e.d_ ct6_ +i ue · -
_ ___._fL_ for_loor-~--IEJ~ loQp_j_~_ us.eclb__ilerale._oveLa_sequence. -oF _
___ _ _ I eIem edts_,_s_ u_cb_a_s_a.__Ud__o r ah LI?9-~LLsim fl if( e.s_-+ b~ mq n-
- ~ ~[Link] ?t -tb~.Jo.o ~au_ctbLe_ ao_°-e_xe.cU~_a_ code_ block _1
___i_:Fat__ectch_Jk1n_1n_±b e._~~u_ e.n_c - __ _
f
- ~-- Ne~ted loo __;__i~[Link] o.l to_ul\5_ ll(Lj:O_ bqve...J o°f,s___j VJsid e., ofher_
_ _ _ loor_:_lois_ Cb,O_cer. of nedin.9__\~F- eDqbl~ 1..ts +o J-ler~
___ j"hlOU_gh__muJ+ipje,_\[Link]~_ :itcrctl:ion___, e1teo1+1~ _ a_ _loor w,+hi ri
____qn o-fhe.r.. [Link] · ___ _
--- - --- ----
•·- - •* . - - • - - --- - - •

- -- ~.. Pctss _Bbtetne.nt_:___ ___ _ ___ _


--·-=--- ___ _In -~+hon Jhe__FQ&, _\Shl-lement i.s q r'[Link] -
--•· Si0t:h1en+ _+hut does no+hi~~ - It _i-s U\Se.d when a. ~ernen t
.. ,s s~n+[Link]~ _reg_uire.d_bttt jOLl don·-h WQn~ -l:o [Link] -
__ . o~ adion or _w11te, <lY]l\-- code u+ -+h J f°'rr\: · t o.d-s
. _ 0.6 ct nt,ll\ Ofera..\.io n ctn cf hel r.s in mqirJtO:ininj --lhe.
_ _ .. 1Stfuch1re r~:1ram • at
Cop4r19hted ~ C'od~WithCqriotts , Com
-- ---
,,,. \ ...

___--tt"i - - The _~5s__sJ.~kmerJ-~_IEL~c~~mon~ used as a.


~pJoceh old er__ -f'oL code.___-!hd-_w!l Ue _i mpl em enied laf er or a-s
--'t;----pl~celxiLdeLfoutnf½J -fund10n&_oulassas . I+ all~ws 1ou
1

---~[Link] tte_valiclrode._-1;M hoilue.e~mmed iJe Imr \em 1chl:-


- --il QtlCD ·
I'
etnon~qle_-lhe._Use_o~_tbe_P~ - ~ktcmerJ_: __
n ():
L -- - + - -- . C\_6_ - \qceholder -fur_f~re_codL Ln1rlelY1en-k-t1 OY) -
,j I .

q - - - 1-
. - - - -.,.tt----+-=-- [Link] :fof coro k_ruJ_c_9J ~- - - _ - -
________c~ qss M c 'L-ss
-""-'= -:- - -- - - - , - . . . . . - - - -- - - - -
ss ;mpl e.-men .fa1·an._ _ __
f ~
~ - - - t l t - - - - i - - - - = - ' - " ' ' - = - /- J--f-'~ = - i = . . . = ~::....,_ a.

- : -----------------...;
-~-~LJJ/ii_luQQf :---

.\e
_.__._----""wbile
--___..__ _ _ __J~, loop in P3:thon re _en:t_ed~ exe.c.u±e.s___
1
Cop4ri:1h-t~d ~ GJ~withCurious ·Corn
._

.. ·- - --- - ----·--

.. a. [Link] cf_ cede a.s Jo~_as_q_spe~ifiel ccndJion. rerr:ai:j'; -,


- ·hue.· ll ~05}s _-¼he._cond,fian _beforel_each _,hra-hcn._and_C:,uiJr..l:!3
-lo e.\-[Link] -the cede. block un+ill__-lhe._ccndihcn_eval~a..+e..s _. +~ -
fct\S€.· ________ ______ ______ ______
. Exomfle. ~- ________ __ -----

_ CcunL. = o_____ _____ ____+-_ _ _


__ _whil e_ collnLsl,._~~ =- - - - - - - - ~l...--- - -
- flir.-l (coun.f:-J _ _ _ _ _ _ _ __ /-- --
[Link]-_t= 1 ______

___Here~¾.e~ndi&;n:__id e_~te.ss10n__oLconditi0,;_-fhctLis __ _ .
'---- __ e,alua~Ed_before._eo.cb_i~ler_q_bJlJL...J F ibe_coo:li-h·~o_fs _-:-rJE. J __

________::fhe.._code _bJou"-_i-o _execukd- - - - - -- -


1
-- _ IL+h ~--coodi-\: \Cn_js._:fufse.--,:lhe_lo op- 1:.s_el(Ctt~ _cm_d _-H: e.._
pt °JrartL cont·nu e_s_u)ifhJ-he_n exLtsla!ement_ aR-~-fb e.. In~, -_
--- ---
- - - ~nMx :_____ _ _ _ __ __

G·-2. ~) l.:- )'"' ;


I

lfie for loop in pr,on is ~sd -6 ikr~e...


oret a. ffijuen£.e o-F eletnehhs , .Sllch as a !is!-, ·h1f1e. ,d-i:YJ,
or rar:5e -
I-!: alloUJS pel~rm a. Get
'fU. -!:o or
actions ~r ~ch itErn )I')
itle. ~e_t.l ence.. . TRe. locr \'OTi<l.b le, -l-~\es -the. value. e::tci) 01
ihrn in -H1e &9L\el1ce · one. bj one , until\ -lne ..se.1uEnce is
c~p ti.:J--~2l 2d [,:.\~\',~:~::,~·:"'~ •:.:n'
------ --- - ---
_ -[Link].hl_._
- - H- - -- : - - - -- - ---------- - ·- - - - - ----

. --tl-+---LfoLi.tem_ln_ ~equencc:::.,___ _ _ _ _ _ _ __ _,
-_ _ _--+l - - - ' -' code.. blo_c~k J - - - - -- - - - - -

I Hlli.Jb_e._jtem rept e£etl:bs__J1b LJ OOf _lldri ab ILihctl--


- -++-;'. ._. ,<1-+-\.e,s_-lbe 1Lalue of encb i+em in -\he se~[Link]~e -llie__mcte b!od.
i----t+- -'- '-1-filde_±h_e_.lQo.p 1s ex&.uk:[Link] L~ rn In 46 e_ s e9uen ce_ ·
• 'X \e1 : H-era +e ov ~ l.___ _ _ _ _ __ _ _---:

~ - . '.,. 1-fl_,___,_t~ppl e. '', ' banana.'' , 11 chen;g_''=1--------r--- ----,


1

-- . . nw,·..L..,,-L....'.....:- - - - - -- - - - - ,
·n±-(-fruit,J - - - - - - -- - - - - - r - - -

lL !

,,
Ii

- - - - - - - - - --

ii
Coplpiqh{ed b~ coaewd.-hC~rio~s I (orn
.9g 1_
--~ £xc:1m le.Z ·. lletale _u.si ~ a ra~e ____________ _ --- -~------
- _: __for_~ in _tu1J9e(1.5)
-___: ___ ____ nnt (,) _
--~=-- - _- _-_- ____ ---=--~-=-
= ----- ------
- -~ -- ---- -
- ---·--:~-0 ut._: - -- - - - - - -- - - - - - - - -
--- ' __ 1_____________________ - - - - -
-t· - - - - - - - - - -- - - - ~ - - - -·
- · ·· --·· -
3
- --- -- -4- - - - - - - -- - - - - - '-
------- ·:--- - -- -- - - - - - - - - - ' -- - - . -
. --- - _.; -- - - - in-=tbe._aho_ve_~ctmfk~_be_.rg,Q_ge.,_(13)_-Euncli'on_
. - --·! _9en~rates_a _15e9uenc.e,_J ____nuro\:ie.t;s__from_ i_-f:o _-1, (exc\ucive)___
. ---~e- loD?- Yar.1oble i ~hes~t\1e.__rn\ue. 4-~cb- numb_eLi n_::the
_____-~--s~uenle4 _and__4b~-rrmlCi)_~krnen1-_ nrrk_ea.ch_n_vmbex_. _
1
--r
S9

.- -, behiieeruoc\i-~;-lue in _+h ; -_~~juttice., _- _

_::=l,1:mro FleLllera.k-Ovei_q _ Yd~ e { humb~


------rtF=;;:==== ==:::;::== ========== --
____,l_foLLJLIQQg e_(s_)/ __
: _ _ _ __ _ ---
__, _ Prinl.('-"""r_
i)_ __ _ _ _ __
r ,
1

-----,J-__:_===~=======================----- ----
1

-~j_Dufyltt:--:_____ _____
0

I 2...
' .3

i--------+-;Emm~LU leta..k_ltli-l-h_CLCYJom_rctt:i2e.-_c\JlLcii-cr---- -
e---- 'l i=====::=:::;===: :;;:::::=== = = = = = = = = = r- -
r.---~ ' _ lti_j_o_ ra nje_U_J.lO1~ :

r.--------....i-,--p_rio± (i)_____ _
r- -.Lout T,( ~.- - - - - - - - - - - - - - - - . - - . !
'1

---· ('op1.(dqhte. LtYIOLlo • Corn


n_4hi-s _exornp\.e,Jh; _r~~~ (1, 1o ,aj "tuncfion _gener?-fe.,s ~
. _ae.[Link].,_ ot-;_niJm~ers _-&om 1 -1:o. __9 wi+h ~ e-kp -s1~ or
- -L-t:.Jli Uoo p_ vq nab lei _tq Ke:s~--the val u.e, of &ch. number h'n
~--±be._s~~[Link]._,_c:tn~- -±be.,_pnnt--C0 ~knent:s ~t1nta eQo
- _ _ t)l-ltDbel ·l
- - - - - -- - - -
I

_aL1'i:!l:ii e---Du eLln_,sei:JUebce-ou.: r : - - - -


:#=ouJer la_o_p_();)de-6\Qck~
. __ _
.--- -i----~o~~r ~Vctda..bie_1nne.L.1~0- [Link].- inne.r :
_ _ __ _ :=[Link]/.oop_code_block_ _ __ _ _
-- ___,.,_______ ___ ___ ___ ___ __
. -- -··-------------;-
-_._____Here, Variable__oLl-k represents -I-he loo f vorio.b le
-3uvJhe. . ou.-ler _loop , .an_cLsequence._ou/er iG-ihe ..se1uehce over
_ which _+he. [Link]- lo°F 1!:e.r~
. Exam fle'. _-

_ _ ·-· for i in raQ_g~ ( 1, 6 ·.


. _ fo1 j in rq~e Cii6) :
*
pb"\nt (i J) end& " '~
rint0
1
Cop4r,9hteJ bj Cod~Wi'lhCun'ous,C'orn
~-------
.----;;F==:========= ==========r
----~·,. 1 ~ ~ - 5_ _ _ _ _ _ _ __ _ _ _ _ _
__ _
1 6 g /o
3 _6_9_:_
--~r-- \1-=15_ _ _ __ _ _ _ __ _ _ _ __
, '1 9 I2. I 6 .zo

II

"

[opu r icihted b4 CodeWithCtnious -Corn


---- -
--- ---

- - ~ -- - -- - - - - -- - - - - -----------

~ :i 7· Ll,g:lhutL~S~i~L~D.8b--- - - - -- - - -- -·- --
!

- - -- - ... . - - - - - - - - - -·
(op~ riqbled ~ CotjeN ithC~r10Lls •Corn
II

; &trl ~ l\ello I //= siri.9/0 7110/e,3


I
0

; eh..'l_ = I Wo r)<l ' -:-//· JJocihl Q. 711() LPS


\Sir.a .. i1 "" ' ·1ftf Ie 7r.k'J l e.s
,-.n_1\·l11r on I~ [Link]"LL I l~n.:JU.q:1e., , ,, "~tf
:I
! 1
,1 frint (ti r I)
;I ein t (IS/ r-')
i\ r1nt (& ~~
:- - -- - - - - - - -- - - - - - - - '
!i duJ-hu.~ :
:j --.! f' -

,, Hello
; )1'\ot \tj
11 f.~ InoY) is r,ower/uJ \an.3W!8 e..
!! In ·lh_e._a_bo-ve- ex_e1_mr-1e.-, _w_e_c._rea_l_e,_·lh-re:,__e_d_i_rl--1er__.[Link]
\Shin_9.s ualn.3 .sin3\e 9u.o!:ea, double: 9uole;, ond ~[le. 9u.c~e,s
., A\\ -lfae.e. wo,p [Link] valid fo1 [Link].~ filii0_315 in fl tho n •

T7·3 _§h·,o~~-,r}_cl~xJn1. and_ spljlL1hcJ :


,, In r~lhon' ehin.515 are. Indexed \Sior H·n9 frol1l o,
1just \ihe \n ma~'\ ol11eY pro_srqmrni~ \dn.3UCA.q_~ · fay lnsict.Y7ce.,
-\ne. '3hit5 'HE.U.D' can b~ l~d ex~d QIS ~hown below .
I
i! IS \.r = 11 \I E L1.0 ,

I
I'
I
I

Copq1 iqhl c,c\ hq CodeWilhCu11btts•Com


---
---- --
----
-==-~exa 11
air le_,__eacb_lelkuif_±be_clr_j129 _ ~Ell{) ". il'l Q6S~~~[
d~cl.in3_iron1-o~__]E.e.J.e.H·_e,L1-LJs_QL1 nd ex_o'.__ E - J.S
__ _ __ao_ki_J n_
__ __oLi.odex j, ''I'' 1s_a.Uod_ex 2 o..n.cleo__on_· Understand 1!l.9 - -
- - Stl.L~_incLe.tin9--1:S_imP-oi±qn_~_be.o.e0tus_e.,_it_Qlb lJ-}$ _yo LL-lo_ [Link]:ess -
___ _q [Link].o ni filla:le....llf kif1Jc._Ch a [Link].s___ 1;,,i-l-h in d. ,s-l-r i' ~ · - -
- -- -
-\be \Sh:iQB
7·Lj ][Link] _____ - - - - -.
1- ---------1.o_ pJJ±hnn~a.n_d_e\e,-\-e., q_d,,i'l3 - ~ - assi-
_ _ ·=3nin-5 i±: -the ~olu..LJion~ LUsi:Qg--=th e._del_k ~word~-- ti ere., _
_ _Q(e %Uo me±ho_ ds to dele-tf;_a_cln115 _· - - - -

--
-------- ~-sko_g = ' ~elLo_,Jdo.r~-'-' _ _ _ _ _ __
--
____ _ --~ - _to~ __Ju·123 -=-[Link]'-- - - - - - - - - -
- -
___________________\[Link]-s _method ,Jhe. _variable.. m_g_~1'n3- __
____ . J-s_u-s.s~n~d _to _v.a!Ll~_None, ett~chy~ _deJf.~·n~ ~tdn_g ·
-=__. ~~-U6~ the •a·~-k~~6~J.-

Cop4ri'qhleo\ b~ Codewd:hCuriou.s · Corn


--· - - -·--
- -·- - -

ii r = ' Hello'
~ - - -- - - - - - - - - - t - -
i : . - - -_____.__,t----~ .= '' - - - - - - - - - - - - - t - -
= ,, WOL.Ld_
eouH- = sh + cir 2.

--~Uepe±i:bOD C*): lfi e_1Ere-h [Link],fmtln r is u..-se.d to ~


,_____, __~m-m~\e +irn __. _ _ _ _ _ _ _ _ __

c----,LfxqmpLe..~:_ _ _ _ _ _ _ _ __ _ _ _ _ _____,;

" - -- - - - - - - - - - - + - - -
1 == '1 He!LQ _
r--~1- --~~u.} t- G'tfj_ ~3- - . - - - - -- - - - - - 1 - - -
----1----P_rhJ±:_ltes_tJ-ll)_ -i.E ~ c t ; ; t -1 e Io ell o

Lo f~Yi._g hte()\ by Codd-4ilhCurious , Com


:=-~J~d~i~(
-
[J) ;Jli~~ i~d ~i~ or era.f-o r ullows you. to cce:)
[Link]£t~ _ct :shi-'2'3 ~ +heir f°~Ji ian ( Mdvr ·
indua C\
Q
35
--

- - -
,----;:bqmFle_~ _ _ __ _ _ _
-= F_=s==;:_=:J:_-==:_"~H::::;:

~ --...r\n\:Jclci[o__]) =ft o~~ !


11 =
_~\\=0;=

H=-
= == = = = = = = = = l

_ _.,.~[Link] ) _1.___ _ * 0111¥~~_


-- ---...----:- ~----=--- - - - - - - - - - - - ; -·
_ ~ S~dn;l ( [ :J) ! ]li_~li__ci~_opera{oLis _u-[Link] to ex~c~ o.
__ _ subdrinj--1i:om_Q_1sh-in..3_bj - -spe.ctbiin_g Q ra ~ e. ind Ice.s ' or
Fxqrnl)\ '.

- -~CLL..L--'~~ ,_wom~''-- - - ~ - - - - - --
--t--~[Link]:t_(std [6 ~ 11]) =#-ou±f Ltt : W~rltjl - - - - -

. -----
__ E--xqmple·-_ _ _ _ _ _ _ _ __

6 1 = '' Hello__ Worl ' __


rim- (' v-Jorld ~---in_~td)
1
-[Link]: Tn.t~
rint ('' p~thon ''
not in sh!)-=#= output- ~ Tru ~
rint (" print~ '"' d-ci)
1
# outJut- ~ pq/ae.
rint (" He\10 11
in $0 -=#= oiuJ-: [Link] _

Lop4r~~lJ ~ Coc\eW,thCurious · Com


7

-1-:- --8-· Fun ciions


:· ·,I -- - - ...

. ..1;--~.'. t __JundtQQ. lD 41\hon :_ _ -~ __ _ ..


. . -- It -·-------·---- - . . . - - -. -

ot
_
_-·..+
- ': ----- - ----- _______ Fqnd-ion()

1
in Pjihon are [Link] reu6e1-b_l~
code__+fttt r~-to1rn . Q -[Link] ti"c _-\a,sk,lf,~ bel f. in 0~ cin,xl~
ancLclr.u.&t1.r~g- pr.o3to.rns_~_bce.ak1Qg _-+hem_c\own_, nt-c [Link]-
..---;\--u\\e_L,_rnore. __ man~ab\e._Lark . _ d
1

___ i: A_funckon i-s_d£tined__u~in..5 _-}\-)e_ def-_k~wor .1

_ --.:.!.. . . ,o~ lloweclb11__:lhEc._Jt1nclio ILl'lQ_m cand rrc:m-lh e.-s i.s . AfllJ . re4ui re.J
- I I ar~grnml'k.~qte_ -6?-➔e.J_w Lt\:lm_-1:b e._pct rq rrt\i 63 :-s j
----tt---' r --
: lE e._b_o_clj_ oJ_-lh e_--fu n_d1 ·o nJa._in~ etltf.O.. dJlct -
- ~'·_eoo±ains_±b_e_c.o_de._·[Link].Lb_e_exe.ctLW_wbetl.=the_:fuod-ion
I

- ~ · __
lS....____,_CQlle.i . . ------·
; RmJions_~um_valu.es_Usi ~ --th e._r~tuto__ _
- -~'.,.Sta~if~tnenL_
... wbich_olLQLDS___Tue_Jimeho b ±o_pQs.s_bct_ds_Q__te_lSu. L-l
~ ~-a t-1nfutroa±io n -buhe_cct lle.t_·)_f_Q_ }ncb~o b_do es no-±-_ have. _
_ ___,_,_,a_ _re_-½ m_B"hakm ettl,_LLw iJ L~rJL_N.Q.ne_~ c\~ u.\-b · ____ f
• lfi~es JtLfunc:tLor:U_

r~=
lne,se _Cl~-- ~ efh~J -fun~tion~ thQ-1-_q ;,~pro-ad~J
---·~ Built-=: i n_f<lnchci-n~ :_
_ , b3 ~on_ Jli~__ate_t1'.[Link]~ _ovaibble. ~out&uoithu~~l,!_~
, Q~-'[Link]±[Link] d~~ BLt1.l±.-=_1 o.-fun c:-B ons_caver_a_ __w1de_~_rctt~j Lal
---,-.-
-- i £ m&ioooli:k03_c_Such_a,s__rrLo LQ,_ Ien iLra119 e.JL1-10 ,Ll+LLQnd_:§ e._J ~ r
_ ___ __Jf)e-s.e.._func._-tion-s __are __accessib\e-_~hro43hou±-_ -the_ ~tboo_ f~-ITLrn

• U-se.c.&kg_J_functi on~ : ]oe15e_funofu n~ _a_re__cte.aleL~e.,_


C'oe:J t1~11te.J b_'j Cod~w i-lhilincll3 . Cbm
' I

48 .
I
.J, - - - -- - - --

---- :: ~e -pro~ramr nedo rrfuy~ -sf


~it,c -¼sk~-
ba~ ;n-4h,e
rr03ram
- - - :;_:,S_ .r~uir emen-\s · User-. det1'ne.d funcli'ons heir _In .break,~
douJn
- - ;; o. f1°[Link] ~ inlo ,smaller, rriadu lQr o~erk , ~ak i~ -fhe_ coJe
corrr
____ _ .Ltnore. or__gan1t(J _and _reusab\e._:_ User ~deft'ned _-[Link]-100-s Qre called bj
--- +- ~e_iu ~mas, and _Q!:lumenl-s CQn -be.,__ [Link].d _inl-o _-\h e,_-funcl-10 0 .
--·;-'T-re9u1red-_ __ ___ ___ __ - ·- •-·-•----- ____ _ ____ _

:.--- --·· - -------------- - --- ---- -- -·-· -

:.....----'·~U-s uhe._deLb~ W_OJ_d-=llil\o wed_bj_+h_e,_f unc~· on _l) am~ to .define, .


;.....-----,--,::thuun_chan · For ex.qm1le.-)_d_e f 8recl()_' • - · -- -- --- -- --
:..-- -~ ~.:.l\dd_ra1enlheeJ?s._a ffr_±b e_ftm_ckoo_n.ame __lo ...def't'ne. __a ~ -
'-----1rqtam.e.:\-er,S_jb_e_f_unct10.o_m_q~_ a_ccef-L:. ro ple.,.,.defj re~ [na~:
.F-0 LE?XO

~ - -SJJse,_o__co Loo__0)_lo_ Jnd i'oxk--fbe_~--l_oL-+he_:func-tfon_~ _code


'----_ ____...6\o___,._,_ _ _ _ _ _ _ _ _ _ _ _ _ _ __
=-- ---½ _._·\ndeot_lbLcode-6lo_cL+.b_d-_ be_lo_n11a_icLi he,_fu nctfon__u~i!::]
_ _ _sr..ce.s_ oU:ab~ • ____ _
'-- --~_l,,hi~e_1be._coda_lho.Lyo.u_waot_-\:h_e__fonci-i o_n_ to [Link].
- - - G~Orbona\~ .,.[Link]~rekto_s\-o.km_ent-__±o ~rec\~
-\he_Vd.\tte, -lho.t-
_-\he _-funcli·on_shou.\d_re±uro · _ _ __ _ _ _
_____ . 7: Gill -!he t=+ion_~ _1.1.si03_'.tts_name., 1°lloweJ. ~ faranihese.s

____ ___ Exnmp\e .'

deF 9ree.t [name)~


prillt ('' ~e\\o, '' +name+ ' j 'j
· _sied ("jo\in j -=/FouJ-rul- : He.I lo , joh~
- --.---
1- - - - ~ - - - - - - - - - - - - - - -
71 1
(' • t ' •

I
I

~ ;I - --- - -- ---- - - -- ~

. ·I

:=· .]/-_
y- ii
- -.F-un-c+-,o-h_-o-al_lt' _o_g_ ___-__ -..
_. ~-
g-
I

~--1 uncl-i'Qri_cc,.l\
_f ln.9 j n- ~~ n Is -lhe roc ess
- ~ _f~n_ctlQ_fi_bj_llSLQ9Jts __oome -followe.d bj pa
execut i '!'.I a def;n
rq n+he1S~ · When d .
ct ed
~ [Link] _r.alled, -the. code. in5ide -lhe. -fun di ms code block 1.s

-~.
_ex-[Link]-· - - --- --- -- --
1

__- .a-aU- a---:[Link]-cH-..o-□>- fo


:!_T_oo_- 11.o_LU_-)he,se,
- _- ~f6 :
I
- i1: _ 1,,h ik_the_ fun dion_c u1L bj_Usin_g -the -Func-h~~ name -fo llowe.d
~
__ _
=- -- -'~fQtan.-[Link] examfle ,_greet_()_. __
_ org um [Link] or arame-ter.s , fct&S
:.-- .... -
_; ·
?~ ltle ._fu n.c b:o o__ acc e~- a~ 1
,.____,!-=1:b_ e_m _in std .d~ mt h ffiBS_ · tor_ examp\e , _:l recl: ( ''John)

, fxgmpl :
.>-:_ _ _ _ _ _ _ _ - -- ·-- -
:.._ __- -l--- -'"........._8L€d:J.n_Qffie~
_
_ _ _ _ _ not( "Hello, l1 tname._+~ ''~!-'' - - - ·----- _
_Brre±-Oo.b~) =#=:ou±pd-: '' Hello_,Ioh n1."
- ---n_..:thi:s_ exomp le,Jhe -fun c.-hcn 3reet IS defi•ned
:- - - - - - -
,_ __JJJi±b_one_r~ ram ~- ~ame_:__1n ~-function i:s _
-+hen ca lled. with ihe.
- - - ar3ument_ John lns,de._-the rarr1n-fhes~- lr,1s results ,n ihe,
~ e
:-----i• fund-i'on-1eirzg execu-kd qnd 1rin-h~ -the._gree~.Qg mess
=- -- 1-"Hello, John l :__

--- -... ; 8·· z- _RettHO Si~km~rrl-


._ I
,shkmen~ in ~-\hon iG lised to -srecir\ -the.
-- 1 -i --Jll~rn func-hon ~ho (,lld [Link]- It allows o. ftlnc+i'on 10
-- -- l_vo.\ue_1hoJ__ o
--ii----
11
il
lop~ri9hkc\ b~ CodelvithCu )i'o us , Co tr,
so

L-- -+----=ue Q! _nur.nheJs-Cn_urol,_1111~_,_;___ _ _ _ _ __ _


~ - -+--s_um = oumi±nurn,.._·__ _ __ _ _ _ _ ____ --
6')

__ ____ ____ ____ ____ ____


...__

._ _ __ _ lfie_tehun_s6km_enLa.llei4S_fan..cli 00_10__be._~ore,_ ve rso.-H \~


~_ 1:0 __ _
_ Q)JnmJ!nlaJ.c__ resLL\h__ oLdctk ba.c\_
t-----___,~ _ ro-'ltdi03_a_w_~_ta
1 CO_~ ·
_ ----'c~\\\Dj_ _____

--= ~---8.'_1:LScoFe-~ )/qriob\eG __ ______ __ _ _ _ _.


- - - - - - - - - - - - - - - -- -- --

-·••-· _ _Jfe _\.3cope- 0Lo.._ve1riable., __Ln. f~+hon refer6 tQ -!:he. __ .


_ t ~(on_ 0 F_Q _ ftoj [Link] uJ here :!he, _Vd nab le._fa rero__g _ni;.:J CAO J CO.I) .
_____ oe_ct.[Link].d ·_ lt .de-krrn1ne.s _it,~_v,s1b1\i~ qrJ\+\-ime at. o
-·-·· variab\e_ within Q fm~ram_•_____________

__ . PjthDn h~ -tu]~ ~i~ ½f~-ot: -


vcttfqb\e 13cope :
-
- -- -- - - - - - -- -

._. __ .. 1 · 6\oboJ .scope.!. Van'ctble~ c\e.t,nd au+.sid~ o~ q ~ "f1'1c~'cn or


-
Cop~ rfqhlJ b~ CodelVi-!hCt1n'ollS•(oM
- --- --
--- - - - -- - - - -- ---- - - -------- - -
. or cla~a~e._,g\[Link] . ____ __ ------
- --- - -
-l · VqrLr.tliJes__le~J~nside. ;iunc~o!L hqve_ ~[Link] -
CALS1Dpe, :
,_-~cof e.· ln~ate__o~s_sihl.LWilliinJ-hat_sr~if1c_-f~lnctl On . -
______._o_cal_yruiable.-s_hcwe a [Link],_lim\le.c)_1o_-llie_duro.11on _of_-lhe.,

E__
___-.£-unction cn\[Link].iio_n_comp\ e{e,~ _&ec.LL4io r1, +he locct( _
__.__vmiqb\ea Qre__ckshoye.d· _ _ _ --- -

- 0 . J_e~ - - - - - - - -

or = .'.(O =#= Local [Link]


e-- -ff----f=--'-t. l. J. .L.l. .~.,,_,..,a \_ya ci # Ace eos i'l3 £fl ob a/ var( Qb Ie,
l'-----fl--_rinlli_ca.1__v_a 0. # Acce.'5&i']g [oca I Vq rt'q~[~~- - - -

- - - -fµ.Ll~ Euoctio _
fJiDW
. glo.b.a.L_v_ar) # [Link] n__g 3/oJ,__g_J_'{aria.b/e.e_ ou+oid e._i:b.e_fu.nct(qf2.
- -· ruol ([Link].).lE Error: LQcctj_J/cm·able JS not qccessible, ou.-fc,·d~_
_ __ .. -tbe_-fqnd-ion •_ ___ ___ _ _ _ ____ _
- - - ---- - -
- _ _ _ _ _ _ _In +½,s. examp\e.,_3\060.\_v~r 1s ct._.3\aba..L_vcaiabl~
---~n_b~cc.e.ss9:.i _from_bo+h Jn~ide.. and out\Side_+he._tL1nct(o11_
-. ---.Joca.l_var_js_a. _\oca.L va1iable,_1h~J 1-s on~ o..ece.&sib.lei_-lhe.._ rn~ ....-
- - _ _fundion_fun.c½'on~Jrjin--3 _tQ_ [Link].s loca\_ vcr(__QU±[Link]~- -[Link]~
.______ _\O\\\ result.-_Jn__ OJ) error __bee.ca.use_,-h_is_no+_in -tne._sco e. - _ _
1

Cop~r(gbkc\ b~ CoJeWithCmious •c~ll'\


- . 3·t lnhodu~±io,1Ji,Jile Jnfutt oulput \
--
------- -
- - - · -· - - __...-:t

----- -.-----l...L\e._jnpul+ou}p~t-:-lLj_Q)_ te~ers_-toJhe, -rrocess -aF -


- ---- ~o.~dQk__from_an_d_wt1itD_B_ dc,ih_1o_fil&s '.__ In_ p~-thon,-_-
. f, le-YLulLows_yoLL±o_ w_a1Lw i±b_ e.<lern aLfrIes_ slurecL an ~
_ _ _,_youL caro.p-ukr 's d1:sh.:_lLei1_gblBS yau_lo_ [Link]~_from
_ _ f1~\es.+-wrile_dcitq_±o_:Hle.o ,_and- fe.r1'otm_variou'3 opera-hons - --
, _ _oo_±b'-LU.-_ _ _ _ _~ - -- - - - - - - ·-·

£.foL~etlmmin_g_aoj_or,eratLol)S__oo_a_fde....,_-you. .
- -~ ~e.d_±o_ op_en_iU~±llo.n_ ptovid as__±be_bu i \l.--= in___}oEen_CJ~tll net -
ion_±o_ope.o_fLle.s__JLto.kEG_:l-_w_o_a~ume.nts_;_ _-fhe file,__ nctme _ _
r - - -~ OLf o.-lli)_illLc:[Link]:]Ee_m oJ e_sre.cij i (')3 ih e. f\1'1 t%e.,
- - -9- open in_g _JM__{i Ie...,J> 11di__gs___ve:i_c\ i~ ' U,)HtiQ3 ' or Q [Link] i~
-----•·-c\a-k :_Aftt.Y _jOLL::tlrt!\SL_WOJ k'1~ .w'ith a. 41le, ' it's essenb a.\ -
__ t16irJ.3 _the __~\ose.i) __rt:e-thod . tc ~e:1.-se.. -4he ~km
_______ tQ__clos e. _it_
_ __ .. teaou~ces ossotia.-te.d W\~ +he t\e · _ _

-------- .. He~e·s _dh ~;Qmr~ --oF -opehin-3 and clcisi03 u -file. foy - [Link]~ :
------- ~- -- -- - ~ ._==-======~ ==== ===+ ==== =:;:::
____ .. ___File _= oren ( ''.exqmrle -txt '~,'' y' # open ➔ h~ fi'/e in rea mo
1
e.,

-------- ~.: _ -fi\~ .-d-o~;cf-~ ;1~-~+he fd~ - --

Cop~r~hletj bj Cociel~ithOn-i'ou_s-Ccrn
·I
h
i \H~ R1·,1,li I111 I I
tJl1, l.111 IYl•j kid liIM :
jl
l: , Pg !hon provide..:i wrious [Link] ·lo rectd and
:i un1le. do la ·lo -lex! ·frklS • 1-or rradin~ , ·lh e.. moGl common~y
'i us~d tnc.\hod kl [Link] () ', which Y1cccJ~ -Ihe en·hr~
I
,
1: con~tn·ls o~ f1'lc. o.. s a t.S-!-ring, YoLI con aloo Ll~~ 'readlineD
!'. ·le t~a.d one \ine. a~ a ·lime. or ' rcQ.d/rne~ () ' ·Lo [Link] all
'I \in ea and relurn elhem as a li-c~·
:\ 70 wrik dcda ·Lo o. -file, you can [Link]. -Iha' wriLe.O'
1
.1 rne.~hoq ·
!! e>i-~rnplc~

,1

. ·' In addition to -l<?.Xl· -r,\es, p~\hch a\so alloU>S /OU..


. ,: 10 woYk wi+h binQ~~ -n\es ~uch Q\S 1'mq_9ts au_d1·0 riles >
I I

:, ot a~ o-1-her non- ·lext {ile.:i • l3incnq file~ [Link] tauJ


1, daio. 1ho.~ \'~ no-l ~[Link] - re.~de\6\C: . \o re.a.J oY wtiLe
., bioarj -1-'i\e.-s I yol).. 1w.e.d ·Lo oren ·lhe.m in birn:1,1 mo~e..
l___.-==f t== - -

. . - - - - t r - - : - - - - -- - ~ - - - --- -- - - - - - - - - -
' Yb_' for_
- -tt--srec:jt~i11_9. _ ~Q.d~ -
or ~.wb ~_-for U)tJ'tinj ~-- ----~
..- I

---·-~-- -IL [Link]~Ji9J'Ltlqnd I1n9cJ1;dil1; or et ctfions____ ____ ___


--___ ir Wh~ILUklrb~ _wifhii'b ,.+he~-q~ P~~ibih'~i~.: ~
:_of- errors. ,~uch_a15 _-fl [Link]-L.:f'oun d,.t erm iss d ed ,or disk'.s -
ion eh i
andliflS _me.cban,\srr,__ allow~
. fltl)_. Pjthon___excep±fon_b_ jo~-to __
_
1
handJe._sllch_el'rl\15__gta.c£bul~ · _ ___ ----·
,---, .---~o_u_ca n_u_s_~ e,__j-~-=-eX-_cepl ::.. fi·nctl~ ,_ block -~-
F-f
--------~o_co.+.cL<[Link] Le\:tef"-°n-s..:. . ln.....::lh.e._lq1Se_o LI e._.ope.¥at1ons1
·-----;-1--l::s___Q_::p.1iLrmd:i.c:.e._--!o~tai ~ L _fi'Je,_opetq~'ons . in,s i~ e.. CL
-----~ ~~Jor [Link].J ia ndle th p:tl.Q.hs_m_-!:he._' exc~block ·
_ _lE_LJ(na.J~_'.__hl~~,l Js_us_~ _o_ensLIJi:_trlCtt_ib e._f1'Ie _I:S_ rrore~ -
____clos.e..cl.1-a e.b_if_an_e~cep±i.QtLo_ccuJ'5 · --·· . .
- - - - - - --- - -
1 - -- - - - - - - - - - - - - --

_ _E_'Xct_m_r-,e '. _____ ---·


-- ··-;:: ::==;: ::::== ===== === === === ~
- - - -~H-: - - - -- - - - - - . -- - - - - --~-
- ---· -- ~File. =_opgnJ~qmrle:hl: Ii '
1
' r'D--__ --
- __ __:tt=-J?erform_operq,hQns an +ne file __ -~--
-- _ex-cept_.ID E-rro r : ___
-· - . prin~~ .An_ frror_Qcu1red~) _ _ _ __
·__:.._______!in~t ~ t~~el
[Link]·ho n_
) # E~~~~ -lh;
OQllYS · ~
file. 1S- dosed , eve; it r:1ri

Copyt ~hled b~ Codel"liHlurioUs•Corn


I'
/

o-~o~ect·:· orienied
:= ~]~ _:
:_:_ ~== era-. . n
-,.r~ l-r\q·
. ,- - . ~u-u1u.u I a__
-~:(00P)~-=
-·1-·, J:____ _ - -
[Link] Inhudu@;oo jp O.OJJ_ib_l;hlih;- ·- ·

·I

I A_c\aas___is_ct_b\uerJ_!n:Loc__~e,rr,plctte_-for_cxe.a_~~-
-

r------ __._,~C,b_Jl_def1:n.e.s_±be_ p-rop_Qdf~ (a-ttd butcB)_a nd_behav iors_____


oo)_±bo}_o~·ects_ cf_t-110.t_dqoo_wil\_ ~ov ~a~·ed-
r----. .....-·..L...·s,.,'--'-A-Jan [Link]:.Lllf_i:\qs.s_·
-------------..!

- · - - -- - - - - - - - - -1-
~-¼ ---___,__\.Q~s Ca ~
·--, -,.- -t-- --"le.E in.iW_selE , brQnd_JnQdet)_:__ ___
Co~ r,l9hkd bJ CodeW i-lh Curi ou_s, Corn
___._ _ _ __.n ~4tt10JL_Q_c_ondn1ct0L ia o-0Re.~1~f-~eih~d --
1----- -_±bd_i:s_au.ioJna±irn\Ly__co.\\ e..d_wh [Link]) _o~ ~ tt- is [Link]-e.J .
______LL I~S-ll S e.d__n)_ f_
oi±1E:J_L~Libe_0~€.c±~s - ~itfiblJ..bs •Jn~
________ conshud-ot-_me1bod_ Ls_norne.ci _ '__ in'rt __()' · \
A_ deistructor_is_ another_~~e_d o.\ methoq
- -~~-~ ~H,ctt _1:s _ [Link] wheh _oh o~·~ J i's ~ ~olA+ -t:o be
. [Link],d:_ot -_3C1rb~~ Clll\e.c~ · \!\ \~-'than. the. ddl\lc:lar
___ tnet'n act _l\3 __ named _ ~ _ de\ __ 0 .
16l• ~-- \nheti-bnce., CAnd Tul~mox F'7iem:
-•- - · --· \n\ieri~n ce,_io o. [Link]-sm in oo~ +ha.t
o.\\ow>S Q c\.a.s-s {o 1ntlenl:- rior,t-lie.s ctn~ 1Y1et\io~ furn
_ OJ)o-thex c:bss •me. [Link] -th0-t i~ ihheril:e.d from is [Link]
i s4re1cbss or dttas I cmd 4he closs ·lhal: inherib
rl'[Link]
! is ca\led 1he subclass or child cle1cs . In P~t~hon, o m1bcl~s:,
!· con override or ex-lend -/he. -funcl10ncdi½
1
er
-\he. suEerc/ctss
:! Po~roorph1'srn is -the. obili{j o"f qn o~ecf -lo
'.: {ale Qt) rn,a\,J forms, It allow-s o~eds of diFtetent c)q155es
ti to be +rea.+af as O~ecb or a common -supetclciss '
--
~_Io · <> Encr1 psuh lion _g nd Jhl a Ilid Ing_
I . - -- -
l. Encqpsul~+ion is the bL1ndlin9 oF d~~°' (attributes)
~ .and meA-hocis ([Link]'on-s) with'in o. clqss ·1 t proviqe-s. a. UJJ.j
1
:1 -lo O~Qnhce code ond qo.,tQ into lo31co.l uoik , ·promotl~ ~e,
ts
. [Link]~°'[Link]~ qnd t'€U6'Qbi li!j ·Ix:1.t·C\ hid i~ q [Link]~1c ospeJ
!I oF enmpsuloJion whe1-e. [Link] 0Jty1buk~ q~e. Kept pHv°'k)
1

1j te~~·c~~ . ditec~ .occe&S from ou~1'de.. fhe_ da~ -in,s f'romo~

: -~ mformo.t1on hid IY)j [Link] d~t<A 111+~ nt~ ·


1
" Exqmr\e : _
ls===---= ==== ========== ==== ==r
I c\Qss Ba.n kAccolln _'.
deF _Jnit __Loel F, ace-no):
sel~·-- acc_no ~ oa:_no
QeF 3e~- acc_no(selt'):
retutn .sel~ .__ acc_no

_~ a~count = BanKA<roLint (''l34 56 '~

, print( account. 3et_occ_no (~

rr\n-\:( account .-- Qet-no)


6i ==-- --
~=tr
- - - - - -· - - - - - -
11

~ o~[Link] o~enid in3 an_J OvedoQ.d ill§_ -- --


---
---- ,,l".le:lhad_overridi~ _occurs_Wheo a_subclass -pr;vide.s -
_.-----1±s_own_1.mp\emenk~·on__oF_a_me+hod ioheriled_from _-{-he.
~~[Link].J:') e\-li oLo_veJ\o a.d in_g j nvo \ve-s_defi'n i!!_(J multi pie. _mel hods -
__ wdl±he_oa mUlQme-1uLdiITete tJLp,:i rdm J rs _wifhi n_ a olq,g& - - --
- - ~ ~~1:t'.~m~;:.__:__~_ _ _ _ __ _ _ _ __

-' (selfl_!:___ __ __ ___


-- -::_--~b_
- -P-rint_(~cg [Link] _qrtiJ_ _
· clctss inheri-le a ~ha e,, ---

clqasf RectqJIB\e~~: _
--+- e Ql_gg_l&_eU~±b w1d+h): __ __ __
' eq.:.!.!.::lc=uJd]j::'.l!\..J·-~ rec~rale. qreg :_,~jthl..width) _____ -
i.-----;---1....,__n,l.j. U,·o±-+-('-=-
re_c ~fe - Rec.tan_gle(J_ __ _ _ __ _ _ _ _
recta-Oj}e •C1 rectCLt ,5)

---- - - - - - - - - - - - - - -- - -
·--·--- - - - - - - - - - -- - -
litttiJllli~==- ··-· - = - . _ : _ - _ _ - --

I 11 ·R &c:erHon bandl':!3 me.cb9nistn :


.--tt-~ C ~ . '.cn_-h\pBl_in...sep1qle._exc _ epl:.J::[Link] ,.yo~f-~=
e.~e_snec.1- _Lc_qc.froris_ ±o__ ~e_tctken_fot_eQch-~ _F.e.-0 --- _
1

----t+-"-'-'-cep-uo . e_cr.der _oL-the_exceeLhlocks_J'.:L Jm10 nt_ r½


--~:i-o.J_eru:a_u.~e._-fu_e._£td:_1J1cttchi ~ __exce.f b'on_block ~ [Link] ·- -
------- -- --- -- -- - - -
_.-----+[11·.1 . Q1sJom · &cep±io n.s -- - - ------

I · 5 Error q;;J Ii 23 [Link] :


c...,____._p_~thon,_-\hetLa[e_3e.\Lete1Le.ttox_ hand \i~ _&if~ i~~ ~
_ __ ]o
-·· ____7
0L1_cdn_et11p-loJ- '· _____ _ __
- .. - -1==== ==;:=== =F=== = = = = = = = = = = = = t
____ _S:trQ _~ie_s_ _ _ _ _ _ _ ____ 1)€.[Link]'on __ _

·· - ---------- -· - -

_ --· _ Lo_gg in_g _ __, ~use._o_Jo_ggi~ .frctmewatk 1 .[Link] 08 -\-he,


---·· ___ _ _ _ __ 103.9; ~ mod u e_ t'n ~j-\-'no n , ta re.c.o rd
an [Link] eifoflS ·

[Link] \ • [Link] fallbctck mechan1:Sms or- d


d~rad ci.+i on al\irna.~ve pq+h& ro handle. erro~ ~n
ow ro rbm r e etll-\ion
6~ CodeW ithCun 0ll~ Corn
1

Copg119nte
siraie_g, e.s . ][Link]

Re\rj mechanism lrnrilemenl l~Tiic -1:o au-bma-limlli tetr!J


fa1 led opera ions · ..
!:tror rerdi~ Noti~ users,
or re\evctnt
r
udmioidrct+ors, -
keholders about error-S - •
--- - . .:thro49h. [Link]. channekl ·
.....
- --·- . -

Gracef,\ _ _ Grqc+.l -l:etminct-l:ion. ensures d~ - -- -


lerm,nution _infe.9t1 ~ ---and avoicb_ leavif23 [Link] rce--s -
. - - - - -- in .an incosshskn+ __ sta.k.__ -- ----

------
·• - -- -- - - ---·-----------
- ··-- - -----

.. - --- --- --- - -- --·-- - - -- - - - - - - - - -

---- - - - - - -- - - - - -

,.
!

I
I
·1

(op~,,.ght-cd b~ CodeW,thCuri'ou.s Corn


I

You might also like