Page 223 - Computer Science Class 11 With Functions
P. 223

2.  WhnSlwiaalbtlShtlouSpuSlproductdlonltxtcuSionloflShtlfoaaowinglcodtltnipptS?

                 num1, num2, num3 = 1, 3, 5
                 if num1 + num2 + num3:
                     print("if condition holds True")
                 else:
                     print("In else clause")
                  n.l if condition holds True
                  b.l In else clause
                  c.l  ynSnxlError
                  d.l NolouSpuS

               3.  WhichloflShtlfoaaowinglchnrncStrtlenrktlShtltndloflShtlhtndtrloflnlcoepoundltSnStetnS?
                  n.l :l                   b. #                   c. *                  d. ;

               4.  WhichloflShtlfoaaowinglitlnoSlnlconSroalltSnStetnS?
                  n.l ifltSnStetnS
                  b.l if-else tSnStetnS
                  c.l nttignetnS
                  d.l if-elif-else tSnStetnS
               5.  WhichloflShtlfoaaowinglitlnlvnaidlktyword?
                  n.l IFl                  b. ifl                 c. Eaifl              d. EL El
               6.  WhnSlwiaalbtlShtlouSpuSlproductdlonlShtltxtcuSionloflShtlfoaaowinglcodt?
                  height = 190
                  if height >= 180:
                      print("You cross the bar")
                      print("Good")
                  print("Sorry")
                  n.l YoulcrottlShtlbnr
                  b.l  orry
                  c.l YoulcrottlShtlbnr
                  l Good
                  d.l YoulcrottlShtlbnr
                  l Good
                  l  orryl
               7.  WhichloflShtlfoaaowingltSnStetnStlitlnoSlSrut?
                  n.l Anlif tSnStetnSleutSlhnvtlnnltattlcanutt
                  b.l An if tSnStetnSlwiShinlnn else baocklforetlnlnttStd if tSnStetnS
                  c.l AnlifltSnStetnSlcnnlhnvtlnnylnuebtrlofleliflcanuttt
                  d.l An ifltSnStetnSlenylnoSlhnvtlnnlelselcanutt.

               8.        if num < 0:
                             print(num, " is a negative number")
                         if num > 0:
                             print(num, " is a positive number")
                         else:
                             print(num, " is zero")
                  AttueinglShtlvnautloflShtlvnrinbatlnum Solbtl10linlShtlcodtlnbovtlntlwtaalntlinltnchloflShtlfoaaowinglcodtltnipptStlI,lII,l
                  nndlIII,ldtStreintlwhichloflShtlcodtltnipptStlwiaalproductlShtltnetlouSpuSlonltxtcuSionlntllShtlnbovtlcodtlwiaalproductl
                  onliStltxtcuSion?


                                                                                          Conditonnal SnStetnSt  221
   218   219   220   221   222   223   224   225   226   227   228