Chapter 8
Chapter 8 - Introducing Functions & Modules
[Solutions for the book "Cs with Python"
by Sumita Arora for class 11]
Page 240
Q1)Define a function called Jimmy....
Solution :
Lack of time [Just use print command in every line and design it.]
Q4) For admission in a school, there are 10 applicants... (Pretty long question tho..)
Solution :
print "Lucky Draw Started!"
a=random.randint(101,111)
print "Selected candidate 1 is ",a
b=random.randint(101,111)
if a==b:
print"Both draws came same so re-drawing another one"
c=random.randint(101,110) #just a preventive measure
print "Selected candidate 2 is ",c
else:
print "Selected candidate 2 is ",b
Will add other questions/answers when I get time. Added one complex one^
9.state why are following expression invalid :
ReplyDeletei)asm=5100||val <35
ii)age>70&&<90
iii)income >=5000||&&val <500
Ans plz
DeleteAns plz
DeletePlz ans
ReplyDeleteiv)res!>20||!x>20
Answer plz
ReplyDelete8.evaluate thae following expression:
i)x-yx||x-z<=y-x+z
If x=4, y=7and z=10?
ii)(y)&&(y-z)||!(2y+z-x)
If x=13,y=14 and z=5
Answer plz
ReplyDelete8.evaluate thae following expression:
i)x-yx||x-z<=y-x+z
If x=4, y=7and z=10?
ii)(y)&&(y-z)||!(2y+z-x)
If x=13,y=14 and z=5