Exception Handling, Python Data Structures
Exception Handling, Python Data Structures
on thadicosuy (0r)unerneebed
Stkaafon Or lunpcked ehor
dustng
knoun as cicepkton.
Boaedly classct ed tuto hoo ypes
Run tne onor.
'drvde bs ZeaD
X= fut(xi)
eupt : )
en10Y
lsla4
Ok fale
whele not ok:
humbosbng =
Autegey
10pu
put C"enter
n= 1nt (numbarsbng
Ok=Te
patnt-(nylck.
TeadC)
A.tut
EnlnteITupt
o keyboaid
EnDr key Eor, OVeo
EroY Dision Zto Erroi, yalue Eno1, upe
ErD,Impot
Enc Index EnroY Name
Eno Output pt In EorL io
rynorJ ile Es1DrEnd
the q EOF
e0 an
tnteqer an
ewter O
utege erorNOta
Valid
fopl fnteqexY Oehter
aD
r Valtd aaNot ConD pavt
etupt
pale
claseate
qlsl an2k
Setond Aqumtut d, tu cxupt
block
t co de
Exept <eiceptfonnae >as< exarqune
t handleeror hane i
u 8
Psaut (UYes ut 1", CDls ))
píwt ( reswt a C1o/0))
open
dota f Suad (
Cnt Ucase =0
CntlOK =D
Cntdsgts =D
for ch in dota :
ch ahoAg l):
Cnt Jiow tul
piit
DAt(Total no- d Léaklateyaxe', (cntIcase
d Couat toods):
pt append dao!")
-feateda ode = ht Cinpt ( Entor Heplaue a
ak) Phame= fnput ("Enter he plauer ronm
Rcore =TE Iinput 'entcr the mdHdun au
ronk= Tunt (rnput (U Ento the player ant
9uC = Ptode ": Pcode" Pnang":Pnome, 'soe
@fmpoft prckle
de, an adrcA ():
d= 4toool': ' sulbhamAhmedaad
lucooo': CBhavn, Anand,
Coos': ['ontyBorodo'
Takionelr hckle. dump,f)
ib binauyf-tloxL)
brrtuy d =Prckle load Ct)
Te
f(loc
blnadscl)
clssate
Date
Page
for san
dola:
PCnt ("sOrd,Lnt)
cdassnate
Dote
Puge
fmpoft Prckle
de, add_ecord [):
fle =Dpenl" employe .dat", "ab")
Lohele T e
Gmp ={3
Cmp =['empiode'l=Tt Cinput ["Entzrcmplayuind
)
CmpL'name'J=Input ("Entu emplbya name "
Cmpl'sauauy=t (input ("Entu the salaus:"))
prckle -dump (emp, Frle)
Ch=inputC "Do youLAnt to add more uDAdA!)
break
ftle-clox l)
Rle =open ("emplayc. .dat'" " yb")
impott sy
f=Dpen (Emploge. cSV,'a',uolor.=
emplosttu = (SV- 1o8th CE. dedrmitey =