Cs HHW
Cs HHW
Date
Page
olo+z
HW-1
VQty
hch
Heliday
the pollaung
connot le
,
wseo
id hose identpns
fo hamng analles
2Ttól
2)
D9 lurctions
hhile
tax
in a Pytho
523rd ous
po
frally
Csluin 31
42Swit &2TotaL
etal *tax, 3d Rous, ially,Coun 3l
these iolentiliors lwotit cannst leweod fer
naming aiabia o9 functiorns.
32 Name
ndng seied eccusence m n madam
Ans 2
2lit.
at te position
ndlek Citem
an itm the lit
)
Page
i= i+)
AnsPythen uill nt exate this Code lecaue
e a 4ii initialied to O ROdlsent
sotily dhe gien ccnditon se dha loep is
ppes entisaly and naner ectd.
Reiik dhe folouring fot losp it whle laqpi
fon a in
tiange C26, s00, 25):
punt a
shileao<500
print (a)
a=0t 25
pointla)
a=9O
ashileas 9:
pint a
classMAte
Date
Page
(4
tiing
ntar th
")
tung
w= len lt) 39
pnt (e no. The w in the rung
9Wte a
geneato functionperratasa, ()that
diplays
angunant
Ans def genenallsq(n):
for Ln Aange Cioo,n+1):
O.5
pint lsa)
geneaataAq (a)
alassMte
Date
Page
o5lo5l24
Helelay HW2
1State
la boeak
Teue b False
statmeit gien
: is
In a pyloh pagPan
n a reAted
D1 (
D1
key
Nane
Nane
Name
")
7
a
D1[Nane
c) del.
d) D1del «Nam
dict. DI
"
3. Consuoler Hhe statmett given belou hen
dig
ereciton dae folloung co?
tup =(20, B0,40, 50,80,792
pint (tup2
pint Ctup Lal 502 * Stat. 2
Lpt maxCtup)) # Stat. 3
# Stt. 4
a.tatment /
btatement 2 Shatenerit
Page
check (30)
point
hhich
CX, )
he statmentt
shsuled be
follouing
thu'slak Mising Shalimuls
e n
he oput pooluct is C64,a
(b)global X50
glotalx
based q6.
(a)Boh ad ka the Kas.
Medules.
RiA function in a mslule wees to smply
:b)
Ans Reth AR Rar Apatlsn
t ue bt Rii net dae
coet
nol or A
8. hhat will be the oulpit f He felloutng code:
beles accepti
accepli a numkes
belos as an
Thecooe guien
ndeline el he laum):
cosectns mado
deluie erlumles
em=O
hhileum >0
Petisn_90
punt Hetlunbe Cl234)2
em=O
ushile um>O:
num =num/ lO
pit (anNeunlsen (1234))
Jext 1= 66 TND 23
I=p
ustile I len CText1):
4 ext1I]= 40'b and
Val =int ( Tox t 1[1
Val =Valt 1
AnssD– *3 4
a=20
b-5
pradluct la, b)
pRoluet lq3, p=2)
Ans2O0#12 #
daf ullence ,
CNI N2):
elasi
pit Cm)
Piplay (FuRythun 3.70)
AnsNapHONn 3.7.
elaesate
Dale
Pege
paunt VAL * 4)
elil AL % 5==):
punt (VAL+ 3)
pint (VAL tIo)
Daplay l3o)