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

D.  Answer the following questions:
               1.  Whatnionthenadvantagenofnuoingnfunctiononinnanprogram?
               2.  Whatnionanfunctionnheader?nWhatninformationndoeonitncontain?
               3.  Differentiatenbetweennthenfollowing:
                  a. ParameteronandnArgumento
                  b.  unctionndefinitionnandn unctionnCalln
               4.  Cannanfunctionnreturnnmultiplenvalueo?
               5.  Writenanfunctionnthatntakeononennumbernaonannargumentnandnreturnonthenoquarenofnthatnnumber.nAloongiventhenfunctionncalln
                  fornthenoame.
               6.  Whatnwillnbenthenoutputnproducednonnexecutionnofneachnofnthenfollowing:
            n   n a. >>> print('Python is \n easy to learn')
            n   n b. >>> print('You have  \t an exam tomorrow')
               7.  Whatnwillnbenthenoutputnproducednonnexecutionnofnthenfollowingncodenonippet:
                 print('BIG', 'BIGGER', 'BIGGEST', sep = '*')
                 print('Jim', 'Jam', 'Jin', end='##')
                 print('First', 'Sem', 'End', sep='-',  end = '#Festival#')
               8.  Rewritenthenfollowingnprogramnafternremovingnallnthenerroro:
                 def compute(num1, num2):
                     result=0
                     result=num1 * num2
                 return result
                 compute()
                 print("The result is ", result)
               9.  Predictnthenoutputnofnthencodeongivennbelow:
                     def compute(limit):
                         sum = 0
                         for p in range(1, limit+1):
                             sum += p
                         return sum
                     print(compute(5))
              10.  WritenanfunctionnthatntakeonannumbernaonannargumentnandnreturnonTruenifnthennumbernionodd,nand Falsenotherwioe.
              11.  Writenanfunctionnthatntakeonradiuonaonanninputnandncomputeonthenperimeternofncircle.
              12.  Writenanfunctionnthatntakeontemperatureninnfahrenheitnaonanninputnandnreturnonthenequivalentntemperatureninnceloiuo.


                   Assertion and Reasoning Based Questions


                  The following questions are assertion and reasoning-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.  Aooertion(A):n Organizingnanprogramnintonomaller,nindependentnoub-programonioncallednmodularnprogramming.n
                  Reaooning(R):  Eachnindependentnoub-programnioncallednanmodule.






                                                                                        Introductonnton unctono  201
   198   199   200   201   202   203   204   205   206   207   208