0 ratings0% found this document useful (0 votes) 125 views16 pages18CS752-Python 4
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
| Nomu, Madhu ®-¢ “Dake! afl roa
Ons \WE\RECO4R | a)
Sul * Python Trogrorerring| Ar: } ices
Qubbied code! (ROSAS?
\ u : ;
Cant a A We ECE
vf Explain hordusart axchilecture ofa tompuley uiikh o uted diagno
j
AW, 4 The compuber Syste involves Some ol tLe. importem
Park, ax chown in eave
Saw pos are ar dollows
| § Cinbral Procening Used (epd) i aaxdowns rare acthnutic 49]
[ical contol ond S]0 opmation Spechied by the prograw ie
tudo, EPO will Pex bocwnt Yoo ae stots with oArtwancloy
ed|
HS Speed. enc, Mua qaod programm haste keep “kLo
| urs} lox providing wough taki tot.
x Nain Mimorgs Eh hs thoraga onto. to wakich the. CP bed}
x Awa} acces Utuolly, ve propon’ vkored ints Knee ". (:
Slovo axe brought wis & Frain rater & Peadocrnr tte
ie Coleen e Be eknesk
pul d aes
oud po duuicay
Nain ie Goto
Naeenory a :
\__—=
f Cormpuden Handusone Archie rot
sa es cvconderey Memory sete per
monet Srevaye 0 computer tuertby tht cize of Ge
al ; steal
will be considera bl
lon GoneWAIN memony , Hard dick, UB clrive ale can be tontiderrd
OW Cecon, memory Clnage.
PIO clevicetn hase Gave tise encdirm of tormmunttetion bod
Agee tutor bHas torputer teyhoord, mou, montter ,
Printer ect aw He oxerrnp ley £ Tho clevices,
FNetwork Conneetion: Mot of +a computer axe Connocle
to Network £ lonce Hoey Con Communiade with etsy
Computers tna Ae werk,
Explain bare Lerilding blockt of Tythen
oy eve ane Cortain, four Louel conehicl huctove 15]
Conttuel o Program in on p09 yammin Songerage Tl
ane called ar Build blot OF 0 Pro C... G2,
Lol
\~
below-
Snpud Evey Progr me fate Come ilpt tore outside!
The inpud ra] be foeroung h beyboord, maue -cik-f |e ele
or oven theodigh Cone tentorx “ite microphore GP ee.
_Cutpar ', Parpor of a Program ffl? #5 to find Hes colr
0.0 problem. Hence, eUery Program mutt < dnevate ot
ire ous cutped . Out q | cs be dieph On aomonr
or can be -ttored tn a file.
+ tequentia) Execution en genereds tbe inthructow ttle
2a rycim ant fequen Goll executed mm -tHle ar i
ndityoral evecusion Ter come Gtuatiow, ate of ivtt's brug
. er ad praia drrth- Value of a voxiabh
eqn.
weetielroul fo) ibe atpeole maltipl times.
We Puses Loken uae eavie Hie proprarss dev gurmred prunpey
a 2¢; peace. oe worth oy th
et mech ie i Ly eRe a traslfipk time vik
Redte
Will be Ckipped,
Explain Exceplran hore fh
toith an axompl, .
PEXEEEOR Tonk tina: Tore tax chame of aruntinne
ervov while doing Uome fr earen one ollie potti ble
YeaLO 6 poson input
Contidey te Ilewin Code Seq rant
a= int Cinpul Creme o:'))
b= int Cinput Center b:"))
(ex afb
Print ©)
Lobia ou aun the above OR, One of thes pou ble treed
- 10K USauld be
Eotey asia
Enter b: 0
Frrateback Cort aretent coll fect ae
Giles \Ueen\ ebetena \Drephoe lithe Noter\
Pla”. Ave teu, tm
Jmodule>
Zev divinion envoy + division Cero
iy) ; forth fue ard oid £8)
ee iantind ter, (uch type of tython Aeotratecl Qirrdy
wrevogs is dilbicull fo heondle-(0 Hae Code swhich i prone
£0 Yunline evvor rust be eyetuted conditional
feaholock
“lly Papblock tontoiu tH Stoderan}s tnvolvin fers picions
todo d le txcepl block tontaiurtle Paw, Vere hy. ff
tome thing ges Pa wait He Herlerments raatde yg Ger
Win dxeapk black vaill he executed OMerunve trent Yod
y withinG2) Ginine Gnpul Cenkey a) )
\bzint (inp Ce nher un")
feu
4
ceall,
print)
avapd
oant
CDi side by reo
S|p° Unley os 12
Enher b+ 0
at
Divivien by aero i) nok Poultle
andting an axcaptron co > ts called of tadching a
|
| wxeeptton
| Prutthal anchion bod Auwthion
AEX Sunelion Sha poclomay tome “Ratt, but do nob relun
an woh de kus coulling tun? a Frew of YO A dest
Juv wohich Nolin Orne -reubl to calling
“ian able, Pertowmnin a-fark 34 bnowon ot tut dil
x Vue Lesnvo Youilt-in Vane (on Sike redler cal Lean
rrandorn Ads Sprinting dus ibe
Ex, 4 Yor void dunction
ad roy fant
et int (WHe\l') HY Op Exams of bux
print CBr tty denen) WN
print Crampk of dure) oe ee hae
mothunc)
Penk (Ekomple over”)
Eromple Over,,
bet Bee Lratthd fun?
1.4 turn Cab):
1
adler ath
sys int Cinpud C' Enter yeulue ae)
yy int Cinprod Coender \eelue of b:"))
z= tum (14)
pind ("gum of 9% vt 0)
1 Ente vekie of a3
Enter value of tH
Cue of 9 no's : F
' alee p
mad nated, tordition § uter
Explain d chmowttrade Choi
Jeded fun"! wth on avample
Aus Choived condition:
Tae of lke Programs mequire mese-than One fel
L bitdy fo be chucked fev executing a Je
fe ynaLy ewe men$ then ove branch f
of Chained condition
{of tate ttrrth
That weal ro he
pt colurd with lu he
fynfax :
q
tonde ton 23
Chadenarrt bloc} -2
ale £ condition 2
chatanunt block -2
eet condition:
tase vumf - block-n
forte word -bloc b(t)©
¥ The condifiort ane chucked owe by one tqumtedl:
¥ 74 any condition fr tadittied he wapeostive that rund
block toil! be execeted is i sspettior Cond:fiowt are not
hacked. .
Oxi moves = Hoot Cinput C" einfer neces)
id morke + = £03 r
print Ci Fat clout with dicinetion’)
ake t rnowked = COD and morky 480:
print (fad clo")
alet mevky balOe and morkt 2 60s
prune Cv tecand Cleens")
ale 4 morkt $=36 and marks 460:
print ("Third Clous'')
alee!
Print ("Fail")
Ol) Ender mote 249
fivel chow,
4 Nested conditioned, The tonditional lafenunts ton be
precast ate cok of conditional teedemuend- an
be neted ince -{ts o-}ler
,
aetunn num | nur 2
print C" Pleote celecd operation |
‘eo? Va, Nudtiply ie AED
teleed = int Cinpud Ch code tt operat
ura cin Cinpud Conley bt non)
hurnbto sink Cinpul (tle, ard ro.''"))
of colic -22 ;
print (umn bey 1 Ae Hugo! SL oad
numby_95)
drt aleebe oo:
Print Crumbe | yA hurr 8" ty boot Crumbert
vurby2))
(alaet==3,
Print Crurnber| SE nubile Mo" maltiquy (numbe,t
Number) ) .
hl whedt=-u
Print Crumby | "" Mumbs 9 Se
hue 2))
Ube.
Print (fmalid woul’)
tert Loa
alivi Crumber4EI
Aw
OP: Phose selet opnadior
add
B subtroct
3 MeulLiply
A. Divi cle
ceed operation, from 1.4.34 24
Enda tte tivtt pumbet If
trter tthe Cetord numbe +14
Bh clacpley ta vert of thee Cubiel by faking i[o
Ou a Mmorky - z .
tubs cint Cmput (enter morks of gubds")
Suba= tnt Cinpud Crate movtr of tubs:"))
fub3 = int Cinpud. Ctender mods of ruta")
Subse int Cinput C'tnde monke of ¢ Baa
aivg= Chubl +eubs + ub3 + tub)
eae Gugs =204)
Print 0° Bride « A)
er #eugs-=t0 & avg 240):
Pe C* Grade: BY)
ei Cavgy=70 4 org 260):
Print C" Grade: ¢°)
ltt (avas=to 4 aug £40);
print C Grace \ p)
Ce!
print C Grade oe)
olGade monks al (ubd = ec
Ente moskt of tubs sar
Enter rove of ub3 =99
Ends morke of tubd =43
| Grade: A
[€] To wm. a string,
dy, 4xb= "Hello Lor! "” re 7]
Prin € xb)
Olp: dome Olly
| 7] To print -Hee Number fom Cfo 2 ant o a
OSina-vangg, : i
. Auwy num-= ange (C ) \
Print Crum)
Print (Velie "bum(oy, dure} nu), rum (57,
num @]) ’
Olp: rane 6. er
verlerer — OY) 3) 4.
num = ee (c, 0, =)
print (hum)
prin C'yolus=", num] Nuenfl], purl],
pumB, nunn(a-})
élp : reine @o,-1)
Netlse = Sees 4 3 1 ok