Page 200 - Computer Science Class 11 Without Functions
P. 200
Assertion and Reasoning Based Questions
The following questions are assertion(A) and reasoning(R) based. Mark the correct choice as
a. Both A and R are true and R is the correct explanation of A
b. Both A and R are true and R is not the correct explanation of A
c. A is true but R is false
d. A is false but R is true
1. AtttrSion(A):lInlnlprogrne,lnlttSlofltSnStetnStlenylnoSlbtltxtcuStdltvtnlonct.
Rtntoning(R):lInlShtlcnttloflShtlcondiSionnalfaowloflnlprogrne,lShtltSnStetnStlwiaalbtltxtcuStdlonayliflShtlcondiSionlitlTrut.
2. AtttrSion(A):lCondiSionnaltSnStetnStlnndliStrnSivtltSnStetnStlnrtltxnepattloflcoepoundltSnStetnSt.
Rtntoning(R):lCondiSionnaltSnStetnStlnrtltxtcuStdlonaylwhtnlnlpnrSicuanrlcondiSionltptcifitdlinlShtlhtndtrlcanuttlitl
tnSitfitd.l
Ans. 1.ln 2.lb
Case Based Questions
1. RuhilaikttlenShtlntlnltubjtcS.lNow,lntlthtlitlatnrninglSolprogrnelinlPyShon,lthtlwnnStlSolcrtnStlnlprogrnelinlPyShonlShnSl
chtcktlwhtShtrlnlnuebtrlitlnleuaSipatlofl5lorlnoS.l htlhntlwriSStnlShtlfoaaowinglprogrne,lbuSliSlitlnoSlgtSSinglShtldttirtdl
ouSpuS.lIdtnSifylShtltrrortlShnSlRuhilendtlinlhtrlprogrne.
'''
Objective: To check divisibility by k
Inputs:
number: Number to be tested for divisibility - numeric value
divisor: divisor - numeric value
Output: message to print whether number n is divisible by k
'''
1 number == int(input('Enter a number : '))
2 divisor = int(input('Enter divisor to check its divisibility : '))
3 if number % divisor == 0:
4 print('Number', number, 'is divisible by', divisor)
5 else:
6 print('Number', number, 'is not divisible by', divisor
Ans: ● lAttignetnSloptrnSorlthouadlbtluttdlintStndlofl==l(aintl1).
● ThtliflbaocklnndltattlbaocklnrtlnoSlindtnStdlcorrtcSay.
2. HneznlwnnStlSolcrtnStlnlprogrnelShnSlntktlnluttrlwhtShtrlhtlhntltttnlShtleoonlorlnoS.lIflShtluttrlrtpaittlwiShlytt,lHneznl
wnnStlSolditpanylShtletttngtl'EIDlMUBARAK'
Ans: answer = input('Have you seen the moon? (yes/no) ')
if answer == 'yes':
print('EID MUBARAK')
3. MurShylitlatnrninglnbouSlSrinngattlinlenShtenSict.lHtlknowtlShnSlShtltueloflnaalShrttlinStrnnalnngattloflnlSrinngatlitl180.l
Thtrtfort,lhtlwnnStlSolwriStlnlprogrnelinlPyShonlShnSlncctpStl3lnngattlinldtgrtttlnndlprinStlwhtShtrlShtlgivtnlnngattlforel
nlSrinngatlorlnoS.lHtaplhielcoepatStlShtlSntk.
198 Touchpad Computer Science-XI

