Professional Documents
Culture Documents
Seal of
the
Institute
Content Page
List of Practical’s and Progressive Assessment Sheet.
Dated
Sr Page Date of Data of Assessment Remark
Title of the Practical sign of
No No. performance Submission marks (50) (if any)
teacher
Install and configure Python
1 IDE 1 8/4/21 22/4/21 50
Write simple python program
2 to display message on screen 10 8/4/21 22/4/21 50
Write simple Python program
using operators:
3 a) Arithmetic Operators. 15 8/4/21 22/4/21 50
b) Logical Operators
c) Bitwise Opeartors..
Write simple Python program
to demonstrate use of
conditional statements:
4 21 14/4/21 23/4/21 50
a) ‘if’ statement
b) ‘if … else’ statement
c) Nested ‘if’ statement
Write Python program to
demonstrate use of looping
statements:
5 27 14/4/21 10/05/21 50
a) ‘while’ loop
b) ‘for’ loop
c) Nested loops
Write Python program to
perform following operations
on Lists:
a) Create list
6 35 14/4/21 20/05/21 50
b) Access list
c) Update list (Add item,
Remove item)
d) Delete list
Write Python program to
perform following operations
on Tuples:
7 a) Create Tuple 41 14/4/21 20/05/21 50
b) Access Tuple
c) Update Tuple
d) Delete Tuple
Write Python program to
perform following operations
on Tuples:
a) Create Set
8 48 24/4/21 08/06/21 50
b) Access Set elements
c) Update Set
d) Delete Set
e)
Write Python program to
perform following operations
on Dictionaries:
a) Create Dictionary
b) Access
9 54 24/4/21 09/06/21 50
Dictionaryelements
c) Update Dictionary
d) Delete Set
e) Looping through
Dictionary
a) Write Python program to
demonstrate math built- in
functions (Any 2 programs) b)
10 61 17/5/21 09/06/21 50
Write Python program to
demonstrate string built – in
functions (Any 2 programs)
Develop user defined Python
function for given problem:
a) Function with
11 67 17/5/21 09/06/21 50
minimum 2 arguments
b) Function returning
values
Write Python program to
demonstrate use of:
a) Builtin module (e.g.
12 73 17/5/21 10/06/21 50
keyword, math,
number, operator)
b) user defined module.
Write Python program to
demonstrate use of:
13 a) built-in packages (e.g. 80 17/5/21 10/06/21 50
NumPy, Pandas)
b) user defined packages
Write a program in Python to
demonstrate following
14 operations: 86 17/5/21 10/06/21 50
a) Method overloading
b) Method overriding
Write a program in Python to
demonstrate following
15 operations: 92 17/5/21 10/06/21 50
a) Simple inheritance
b) Multiple inheritance
Write a program in Python to
16 handle user defined exception 98 17/5/21 10/06/21 50
for given problem
Total Marks 800
Total Marks (Scaled to 25 Marks) (50)25
Page No.
Date
aachical N:
Aim:Tnatall and_onhgure Pyhon TDE
TXResource used
|5aNoNome.c Repuce. spacihcei.on inyRemak
A Computer ystem Lomputeflis, A
2
868 RAM)
Cperahing yatemwindouws 10
Developme.nt Pytnan TDE
Sooae
XIPctica reloted aueahons
4nlnte steps `nx intalling non on
2arelling Pytaon in Windauds: indauls
lpen ony itenneF
mou6enupetipsANWW.
downloscalin _addres hc and tnted Pfnon.org
Home poce d ton viNNG
ick on_dounloid the Cisplayed.
gtest Neasion y windaus
-Open tne pthon 314 xerian pack and
stoT double dick on it
instolakion gnd inatollathon indouls
Clid on ext inato0oL r vill he cpen
inxtalaion ond Hhen Stup
10gsessilndoud u be aened
Haer compleke me
in Pne indaus
intallaion,Cick an close buton
Date
L
Xxecise
Painthe vesion o lyhon.
Codeimport S
roint(s5.vession )
Outpuk- 376 laeout, Jon 82620,20:23:.29) M5. v_1gi6 64ht [kA
2|\plrite steps D \oad pAnon intexpreker in
Lres stoab buthan yuindaus
2 Secach mpyinon.3.7/32 bit)
S.Cick on pathon B732 bit)
a Ython inteachve psompt in
will apped than_comonandl line
achcal o.2
Date
Resour ce ecuiged
Na.Name a Resouy.cespeihcahionu lduantiy
Compute bystem ComputeriS,
86B RAM).
2 Opeachng ystem nindous
Denelopm ent Patnon DE
Sotuuaxe
Inpthon inteamete
aas) Cmedlenov Puthan astp ile.py
MBTE
hose P5 C\ueslenavo
Dalo
hachcal No3
Him Waite dimple puthon pmodomUSing openadtug
ailhmetic cpexatds,logical opexgtun
Bituuise opeaotors
LCompetenty and aocticalsils
Jexelop 9enenak Ouzpase moqiamming uanghon t
salve paoblem.1he paachcal is apecked udexelop
the nllouing skils=
-Wite a piomam s e hzithmefic lqical ihwise
ODexat
Re3ouKces Ue
SNo ame c Rexauyreabpecihcctan uanih
Computez sptem VtpraS 868RAM
CpescngStem lindouslo 1
Develapment iucxe Btnon IDE
* Exponent)-Vexhrms_exponential calculakian
oaiihmehcopern
obouk ditwenent
4 Des
y t hcaibe
o n ANith_appmdaiate emplea_
operatuyleaning exiptiun
AddiionAddsboh vaues
mpleupu
operúncl hon 27 10-5
5ubbachon Aubhacks agnt
eopercnd
gnaluMeanina Dexcaptia
Bitwise t copies a bit iit_exists in Example opur
OR eitmey openand zlalb) 4
T
Exeacise
ikea psocctam conves U.5_dallors h Trcicn.pee
A= loat Linpur ("Enter omaunt ia 05 dolca
mnt "Rupees)
Uurpud- tnter onmount in U5.dollas: 43
324624-Kopees
3206.50 09449g9s Pupees
Page No.
Date
2
Tde a paoqtom o convert bk o 1Megcmates.Gion
ond leolbates
bit = int (input (" Enter hik"))
kb huhe/1024
mb=kd/ho24
a mbh024
\ ~s \hcn_j{)_'J'---------------- -~
na\ 1
•1C) _\,1 .C-I . . ) __ _ _-----'-_ _ _ _...!--_ ------1
lI
( Page No.
[oatl3
I ( ~ '
\ - I'5
\vo''
r Page No. l
[_o_are_ __...._ __,_____,)
· ~we
Page No.
Oat1J
Lto
<o
~
''))
'
-
~ - -+ -~ --~ -· (I_~ lD~- \\ ·- 1~ ..L_l_.\l l!J~'L '~'- - - -
( Page No. 1
I l '
I!>
llj
If
cfQ.\'.Y
Page No.
Dale
·L
po.srn I~
ve '/
Page No.
Count= O
cunile.Ccount<5)
oint he count is.coun
cOunt+
pint (aood ye
My YaY In_secquence
Shatementls)_
St temeniy)
nested
he 6untax ta unile \oop is-
anile Opession
hileexpre3Sionriny
stode.menks
statement)9
A hna nate on loop nesinc is tnatOu
canpur
anu upe c loop inside c any otnen type cleop
EXample,
9.19
shile (i<20)
2
hile i<= lip:
i not Cil): baecuk
6
Cnange alouding Patnon code rom
cop o loop: Ualng_Ushlle
hile xK\0:
pint lad
At=
Code uinq r loop
y n ronge A,10):
int (
Oudput: 2
Page No.
Date
XIbaentcise
4int the ollauing patteans UingJop
a
in xangel4
Oiin ranqeLi+D: C
paint ("*,end= ")
fdiiin anoe 3
in gange(2-1):
p i t (" end=
k in gange (02 it )
pmint (end="")_ A
paint ( NE
i i n range
O
2,0,-):
o in sange 3,1,1)
paint (end= ")
k in sang241,0A)E
pint ( ,end=)
printO
CLOLOo
1olol
lol
Page No.
Date
in range(4,0,-)
O-1):
h i n range 2* i-1,
nd paint ("0",end=)
else
parint ("",end=""
pint(w
2NAP to int al even numbes bekapeen 1 to 100 uAing wne
>=
uwhile zK=\00):
pint (a
Sumt=N
pmint (5um)
Oukput 5
VolAP print ihonaccisemea
neint inpuz Entey oumber")
a0
b1
lolol
rint Leend )
Page No.
Date
b
bec
CEC+bp
paint Factonicu=" )
hile (nzo):
= l0)+n\0)2
num-
pmintnumis padndrome)2 9Ain
pint Aum is not a palundzome
Oukput:Ente number454o
454 ispaindioame
Page No.
Prachcal. No6 Date
l=L0,20,30) 40, 5o
PaysNo.
Data
ist LL
LiO,203040,S
20
L2o.30]
aUpdating List:Vau_can update single o7 muliple eemnt
c listby qavinu ne slice on the let-hand side c
he aasiqHment opexrcto,and yau can add hu eleman
in a dist uh he append)mehoc.
LiO 20 B0,40,soJ
222 4lols60
LGO20,20,40 ,so
22 listi+ l40,5O,6o
Lio,20,30,40 SO,60)_
iThe * opesciror epeak o dist cven no. o items-
>2d2=l'A B7
>2z d2* 2
[AL,0A'LBT
ivJlnle con inaent one item at a desised dacation 4 uing-
the metnod inseaBQ
2222lo,201L
2z \2.iMeat.iL30)
ClO30 20
e.qist z lio,20,30,40,50
i t , KEmove (30)
>>list
Llo 20,4A0,so]
xaacicalaelated_duestian
henoto udee istz
Lists ge used to sture mulkiple items in_asingale yazriae
Ahey care used u stome an oydered callecion_cin
wnich night be cB dierent upes
2Descioe voiou ist unchon.
append)-Add inale_dedtent he endc dist
Cop JUTM_a shculou_copy c cust
eod)-semaves al itemg om the list
Count aehins count o eement in the dist
xtendO- adda idetable elements tu the enc c the Jist
indexO-setusna index c elemen in the usE
inestO- 'msest 0n elemenk c qien inda
Spop Remav e oleme.nt a avèn indea
Temovel- emove item am the oiven Jisk
sexese - evese the clisE
SDt U se1s elemenE a dist
3 ite
dusk Yem.smaxNOmethod tu COunt
occusencel
slcouat)15 on tult unchion
cOunt c NOuD On mes inOxtnon tnctgeund
a cven dovect oCu inu
Ho to concatenceke cast
>Ta cancatenate 2 dists t opescukox can be wec
d= i ,23]
d Lp,20,303
Ja
C2 ,la, 20, 30
sTusti he statement Lists are mudgble
Lists ne mukable oecase ne yodue c anu elemen
iside the_list can he changecl ct any pin o ime
rarue
eqlisth e [1,23.4,S
print list pop)
2
> Jist
L , ,4,s
Page No.
Date
i)s»istapoplA)
2
s Jist4
LL,,4,s1
Page No.
Date
dal45,61,2113,50
SumeO
r i in di
Sum+sL
print (sum)
olp -196
2 NHP to muliplies g the items in c dist
Ja[s,310,21L
SL mu=11
Multe
Print mul)
olp: 800o
3WAPp oet Ane loxgeat o. rom a ust
l ls3 3,24,32T
eszl[)_
o r iin d:
loroe>t<i
dozgest =i
pint (Josgext)
olp: 78
Page No.
Date
o in 2
iviejprint (i end=" ")
Olp- (ommon itema rom 1&l2 ist cre: hik.7
aacical Na7
Pim:waite pthon proqrom tpeahuzm allouLpouL no
opexcuions on tuples Caeake luple, Acegs
Tuple, Updade TupleDelete Tuple
LCompetency and iadiCal 3kills
Dexelop ënesal urpose pTOTamming UALng thon
salve paoblemhe rcuciccu is expectecl to develop_
the allouwingskills
hWaite a pyihon pxogsom un tuple
racticd Curcomen
aite phon pmam peaÍMIm {allauitng opemcicns
On Tuples
Creake luple
2 HcesSS uple.
3 Updote luple.
. Ddere Tuple.
Page No.
Date
XLLxemcise
e a e o tuple cnd ind the minimum anck MadMum_
numbex krom it
t=S6,12,34,34,9L,671)
print ("Maximum Volue" inH)
paintC1Aaximum Value:",moxt))_
Olp: Mnimum Valhe: 12
Maximum Wedlue q1_
2wAP u nd ae epeaked itema o
t ,2.3,4,214) uple
in t
tcount li>LL
printli end - 1)
Olp- A 4 4
ont no. in uOYC) nx exumpleN= Cne Tuua Three ay
t=zeno" "0ne, "TTheeu,"heSix",5een' "Eht "Nine"
nEintLinpuH"lntes numbe)
X-0
whle (nz0
lo) +(n /b
while (zz0)
Print(, erd =" )
rochcal Na9
Hum. Worite python pr0030m u perorm allawin
operatiana an Set Cneoe su,Hccess Set eleer
Ments
Updae k,Dalete Sot
Compeken.cy and Prach cal 3alls
Jovelop qenexal purpose poaaam.mlng using hon
salve proolem. The porcucticalis epected to deyeop He
olousing kills
hlite a pmagsam uaing e t and ensiomb openatian)
duke create acce5updoke ad delete
Date
djRemoving items in se
discor dd
NG can xmove dements om_dethy aing discay
method.hre is no specibindex aktache.d to th
neuuladded dement
q Num- 5ekLCio,20,20,40, Sol
Num,duscac (S0)
Yaint (Num)
i53upeset
O-checka i a set 16Superset dgother e
Page No.
Date
hersechon c seks:2S,lao
output
Union c sets 100, 200 50 3S,25,604
Set ciesence S08S 1
3S,so4
ummeic dillerence 200,S0,
QputMayimum Vcuue 92
Minimum Vcuue lo
XL|xeacise dict
lascenchngandldescencling) a ctionaoy
WAP tu do
Dy vaulue.
d i e ti = { a 4 , b 7 ' 2 , d ' s
Lcicti ,key=clicti.get)
Csoded-kes goxted
-clicti}
iain a-s0a ted-kes
a-dictl=dicti[
paint (Ascendina cichoncnay a-dict
Date
Oukput
Hicnest3 values are: L_32,73,5SL
Pzazhal Na40
AP w ademosake malh Duilf-n huncio
nong
Him:
WAP t o demonstzake stmng Oul-in unchian
Practia QukcoMe
-Noshe Rhon proocsam o denonarate mom bilt
unchon
ite man piocmam tu demansuake sting buit-in fa
T inimum heome Bacsosound
Matns huilt an unciana: Here is tae list a ll Hae
ncfio nd kmhute, detanecd in makh madule
unchan DoacLphon-
ceil lA Kehum he cellng.vadueTis the smolles
iniege,Terter gy eauol numben A
Copusiaala) Ketun a úoirh the siqn_oy
COs (n) Retuyn the cosi.ne c i
Keturns e*a
ocuria la) Reuanacctoial o
Ketumns gest inteqe less than y ecu
mad a euma remaùnde hen x_is dividka
Returny he qreate cotmmon_ clivisaY
Page No.
Date
hunctian
lag aLbose escipion
Rehurns the log cawhere hase iscixen
log2))_ Relurna he log awheze boae is 2
loglo (z)_ Retuyny me log a where bae is l0
Rerung the in the powey Naue
aemindela,y)| ind remainder ate diuiding yy-
Tacians la Convent angle Mom_deomee) to IOdian
inds the suare co cr 2
sin( ) Rerurrs sine ca in roaclan
tan ) Ketuns tne tangent a in adian
uncion- Jeacaphion
replaceO Retuma_a shing wheae yculuue isreploce i h
Specihed vciue
ind Secorches string yperihedalue Xreturna lcg
osiion_c whee it voA Hund.
inda search smng arspeciigd value x zehuny lo
posiion ahece t o u KOuhc.
splt) splis stmng ok apeihed sepoakoy & etuiny al
Strip)Kemoves spaces at beainning at end dsing
StaztsnhhU| Rekuny tmue i saangshans vth spekec value_
itle) Convets 1st chaacte o eachwOYd tu uPper oe.
tranuate Reurpa ranslated sing
uppes|Conves a sAng iodo uppe CONe.
Xacticcd Relcded uesion
Cascbe about sting hamoti ng openadoy itn cycmple
|Phon Mes C:shde sting omatinq creake ne,
wmmatted sbins\he "ope«ator is aec to
hxmat aset d vaoriubles, ogethes iuth a himct
ina which contains n0rmal tot tugether nuth a
mat stang nich contalna noYmcl text ogethe
i orgument speciies, special smbls Kke
eq print ( ny rume Is 7s ünd age_is 71ds
"Elejalme
ZGive the suntaaand exC1mple c ilel) &captalizel)melho
Hel): synta sting.titlel)
eqet:" My name is Aeicaxee"
oi(teat.ttle (O)
>My Name l s ejashree
Page No.
Date
2capilalize )
Synta s capitalize O
st=hlloa usorld'
pintstz,cap idalize0).
Hellocuod
3|Give the unta and signcance dktleO stipl)
titleDThe ite) Method metur) asthng th 1st
Lette each aDod eapet copitulized.
XLeUse
WAP hat acepks a shmnq ancd calcuake the o.
uppe cese lehes and ue cose lehea
de calealakeCi
sBi=input "tnteastang
uPpe 0-
doue= 0
c i n sr:
Cisuppe :
pper t=1
elib c.isowe):
Jower +=1.
print"No. ouppe ccse detenupper
Paint No _o loueCcse lettes:"awe
Calcucke)
Page No.
Data
Oudput
Lntex a shing Helo wbrlc
No Uppe caAG Jektes:2
No o louwe cse dettes8
2 NAP tu qeneccute aundom foak vnwhere the value.is
betuneen S and S0 using putho madh_madule
import gandlam
painE (oandam. uniaamls,so)
Ouput:
7.15A44 35 219 287
.
Page No.
rattttt SiqAiicanee
TVRelevcAnt ours Outcame
Levelop uncho na or Quen prdblemn
aciccl Jutcome
Lexelap uNe dehned puthan hunchon Y given nobern
1 tunction auth miniñum cxaunenk
2 hunchion aetuMing values,
ILMinimum TheareticaBackaound
Hunchons ge Pne mast impoxtant cspect o an unalicahon
Aunchon ccan be deined .cs ho crqoinlsed ylack e
zesablecode uhich.can be calledneneveequred
alzeahng a hinchon Tn thon vwe can use deE
Keword fo deine the unchion
de mu-hunchon O:
hincho0-Sute-
TekuYn <expIeSslon >
Output:
Outside the unchun :30
xA achica Relededl Cue>tiea
Whak is ouput hlaujing proçqaon
de muuncltext,num)
hile MUMZA
hintLtext)
OuM: pum-11
muhinc (Hello,4)
Hlla
Hello
xexcise
ite mon hnction he okes a numbe o a
pugumete ancd check the numbe is pime oz not,
deoime Lnum
hr iin ange (2 num
num i ee0:
retuYn "Not c paime AumeN
xehun TE is prime number
nt Lpiime.li9))
Oukput-
Tt i5prime numbed.
elbe
Tetuyn num* Yact (num-1L)_
Oukput
Mo upper cose lettes: 2
Na d loue cose lettes:3
Page No.
Paracica Nol2 Date
blPthon--Math Madule.
popuday mahemaukicc uncians e
Some o the Most Module hese indude tignGmetic
ceined in the mcith
Page No.
Date
d Punon-Random Module
hunchosi n he Kcundom lodule depend an apsed
undom no qeneNCAtOYunchon XandomO,uhicn
aeneores Yibodnumbex bekuoeen 0-0andL0.
fxop Andom
2 2import aoandom
22 t Tondom.andom)
O.64517634807593
Page No.
Dato
eUse-deinedmodule.
The uer-defined module.is_uitBen hy the U_okt
he home o p1qiam
JGeahon a Uaex dehned wating-
o Caecke amodule juat wzite Module
o Pfhon code in c-
Pale im äle extengion o
PH
madulenamea Pyis crecked
dek_aceptintd
val=nt linput("Plecae entes cny intece
Psint (The integ.ex vGHe is", Val
ihcessing a Usem-deaned Madule
Ne ace>s he madule hy uing tne impat stakement
anmple
impoa he module in Puthon
inapozt modude-name-
Cutput
lecse entes any inteçie:22
The inece yalue i 22
Xrachcu zelated uestianu
N e outpu c olouuin
impotmath
mint mcin6qmt(25)
Orrint mothapi
int matho decree
i t math.odians
pint Mathosin l2)
--
Paga No.
Data
114.S94SSY02616464
0474g7SS11 96S976
O,s092974 263 2S6 817
O 8775B25%18403723
0.23414336 235146527
24
X txenase
HP o eate a usen dchned madwe that nill 0sk
LyOuT Colle.ae name ond aill display name
o colleg&
de pit clg 0
del
Oupu
tnte aadius o o circle5
Cncum rence 41S3653584 793
Hsea c cicle- 13.s3%1633 A74483
Page No.
Datn
impaxt calendor )
i n tinputInteyear:
n))
month:
m= int(iput (Enker
print (calendaramanth ( y m )
Cudput
Ente yecr 2021
Fntex month 5
May202
Mo Tu We Dh Sa bu
2
l0 13 1 5 16
17 1819 20 21 22 23
Q42S 26 27 28 29 o
31
Page No.
-rocical Na.13 Date
ractical Oukcam.e
olegite Puthon roqcsam tu demonstrcke uae
auilt-in packageleg Numky Pandaa
Use dekned packa.ce
Aample-
stucent= np.ctupelL(name.320').Lag)Lmaus 4)JL
222aanp-ooyCVija 43,90)KPvaxad 38,0) dtupe -saudent)
Page No.
Date
Lxomple
int La)_
uo 2030 40 S0 6o
aspapel23)
L1o,20,30
Ab,5D.6o)
Madellamuh PMad.O
Madelk Mani.
S00
ledoernk NagaaR
XHeachicc aeaed dueslions
ADescibe NumBy Ha
obiecs ca he same upen memom it ia an -
Obiect which points tu a dock o mema eeps
ock d upe d data stozed, keeps autk dY houd
Many_dimensi.ans cze here cndhou \arge each
one s cand impoatamyhe spadng petuoeen
elerments along eich AS
Xeacise
olHP ucreate Lmaddces ancd pesnim oddition
Subtiacion, mulipli.cahion and division _opxcion
On makbix
impait nump
asnumPyaoioyLLI4,3)LISa)L
Mulipli.ccuhan
[ s 32
(S6S4
iwision
Lo.2 2.3
Page No.
Date
rocical No
demonataate
Him \pite a progom in Puthon u
olloun OpenatonualMefhod ovezloacing
Metnod avericing
V Ree.ant louse Cutcome
Denelap unci.ona r cen pioblem
Prackical Cudzome
olate a proqam in_Papho deman tcte
llaudmgoptcuhiona.
AMelhod ovOlocding
2Methad ovesaiding
I MinimumTheozestical dadscound
Mexnod ovedcuding
vearlocaeamahoo in thon,se,aeed ciste- -
thea mnethoc \ogmc insch No tho dependung4-
upontne paametea pased o cuWesent phecë
o code executes insldeme mnchan hx eumple-
deas shudent
de belo lsel nc.me-Nane):
i k name 1s not None
p n t Hey +name).
pinrHe)
Std=5hudent)
5dheloO
sdLaad2
Page No.
Date
Outpud:
He PacLAad
Method CNeoridin
Ahe method CNencinq in Yuthon mecias_cecuting
uo meinod) sitn the same nanme but ditwey
Mpr0gEomminc dacuc Thne concept a Methoc
gMONYAding ollaus u p chanae ax overidee
he Parent closs hunchan in he Child Ccus
aample-
c s tmplaljee
del mesage (selP):
pimhís mesae is om troplauee Ccu
clas Departmnent Emplayee
-del message (selE)
pzint ("Ihis epatment lasisinhented om
mplayee
empstmplayee)
emp.mesage
pont
dept= 1epcimentU_
clept. messue
Oukput
his meas.aqeIS TOm tmplayee Los
Ihis Depoimeak daasis nheit ed rom
LmploaQR
Page No.
Date
Xlercise
3AP u crecte g cass Deçesee' hawing cmethod'aeegas
ht print Toat adezseeTH bos tuosubclaasea numa
Uncdecacluate and "Postoaaducut.'eadh having amethadafe"
Nith he same mame fhak prins "I om_on lliclergradua
andTam lostoaoduaderespectaey.Coll the meihod
by creohng an object.okeach ov the three dosa
l a a s Vegaree
dek qetDecree LoelP):
orintT-got
pint(n
deqxee")
Page No.
Date
ags ndexgoraduakelse-Degzee):
del geklegree.lsell
print ( I am an Underancaducute")_
claa Paskgeraduate LDeqsee)
dek geklleqree (selk2
aint (Tum. Ca lost qaduair")
c Negaee.)
dcetDeqiee)
usUndencrraduate 0_
ugetDecreel)
pPastoraduate)
P-getDeqseel
LOutpurTI go a deomee
g m cn Undexqraducte
I am C lastqo.cu.ate,
1NA crecute cclcs tu print an intege ancd a caaracte
fn uwo menoca havin same nome nik cuerent
seauence inteqex mecharacted narcumekes
seas AO
del shouladk.c.n
paint ("Lom elass A : c n
cless BA:
de sho sel.nc
print "rom class B:",n,
oshou ("T",12
bshoua(12,T")
Page No.
Date
Output
Hrec c Squore:100
Horeu c1eckangle:200
Page No.
actcal No.is Date
Lemued clas
dasBaselau
Page No.
Date
+Body ot boscdoss
doss orwedCloss CBeueclosD:
Example
clos Ya»ent.
pname
CNume-
de shau-plselk
i n t (selk.phame
chd =Chldl)
Chipnaume"Yiiy
chi.cname="
chd.shopl
_chd.shau-cO
bMulhpe Inheatance
Rthon ppoidesus the lexbilih o iahenmulhple bage
doses in he child doas._
Mulkple ipheaitonce meana thot oude inneitdeg he
foperty_c muligle clasex intu ne Tn case uauhaue-
Auodases 40 h ond b.and au Loant w creute
a Detwdoss hica inheis the morpenhea c mhA&B_
bost iusr like oachild innens charactenstics m
ath mafner and ¥uther,in Ython ue Con inbent
iple clouases in a inete child dcus
Page No.
Date
D2raved Cleas
cAmple:
_cass Hdd:
del adclition (ell,o
xetuxn ctb_
clous TMul
de uhipli.cakion.lsell,a b:
ekurn_C b
dass Laixed CAdd Mu):
d Dividesel,a,b
d-Desived)
print Le.addition.ln.m)
pint (d» Mutipli.cakion Cio.20)
pint L.Douide (o,20))
KPracical Relcte.d CJuestionx
5hate the tae b inneitance-
Tahearance is an impatant ospect et obiect-aiented_
pxadigmTnheitane avides cadexesabilih to
the pocoaM_ be.cause ue cn Ude an existinq claas o
Ceatea new cass insteaLc c creaking ik eom sautch.
2 List diWereat pes cx inbemtance
inaLe inhemtaHe
iMdtiple inheikance
Page No.
Date
i Mulilexel Tahent.ante
Hhercvchica Tabeitance
Had Snheatance
A KeACiSe
aeote acoas Empouee pith data membes name,
clepartment and balomy aecde luutable methads oy
eadinq cnd miinting emplayee inmmation.
doss tmplouee
name-u
cdepantment=
dereademp (sdY
. name=inpur ("Enkex nome
sabdepootmentsinpuEntex depaakmett
Sa saloEinaud CEnter alcy
pe printemplsel):
print (mplayee Derails")
paint (Tomesek.name).
print"Department"selk.cdepartmnE)
aintsalomyseltsalaa4)
eskmploueel)
ereadempl)_
e printempl.
Depuxtme.nt T
deread (sel
5ekancme=input" EntenY núme:
5ele. mcukscingutEntes mcaka
closs shudinolshudent
_det printinalsell
print ( Nameselk.namel
print (mMcvsselmavka
S sudino
5.reaclO
Printinm)
nameE
Page No.
Date
de read Gek).
seacname=input Ente chilck ndme:"
se maame=inpatCtote mathername:")
se name =input ter irtber name
der shou sel)_
mint dt.cname.is dhilcdo selmname,
ond se.Vname)
cechld)
Cacecc )
LOuhput
Fnde namelejCsree _
Oukpu
Enkes a
Ente bi0 Zero-
Zesmlivisombzar a n t d i d e aitn
| Page No.
Date
Quput
Ente Peusuordicb
lncoec¥aysurdo Y