Page 243 - Computer Science Class 11 Without Functions
P. 243

xxxvi.                          xxxvii.                           xxxviii.
















                 xxxix.                            xxxx.                            xxxxi.
















                   Assertion and Reasoning Based Questions


               The following questions are Assertion(A) and Reasoning(R) based questions. 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
               Assertion(A): Every loop must have a range() in the header.
               Reasoning(R): range() denotes a sequence of numbers.


                  Case Based Questions

               1.  Sumita is teaching her younger brother about dividends and divisors. To make him practice the concept,   she wants to write
                  a program in Python that that can quickly generate all divisors of a given number. Can you help her in this task?
               2.  Nusrat has just studied Mersenne numbers. He knows that numbers in the form of 2n-1 are called Mersenne numbers. For
                  example,
                  2 -1 = 1,   2 -1 = 3,   2 -1 = 7,   and so on.
                   1
                                   3
                           2
                  He now wants to write a program in Python that displays the first n Mersenne numbers,   where n is provided by the user
                  at execution time. Help him to do that.

              Multiple Choice Questions
              1. (a)     2. (c)      3. (c)     4. (c)     5. (b)      6. (b)     7. (a)     8. (a)
              True or False
              1. (F)     2. (T)      3. (F)     4. (F)     5. (T)      6. (T)
              Fill in the blanks
              1. else    2. control   3.break   4. outer, inner        5. endless / infinite   6. pass



                                                                                              Looping in Python  241
   238   239   240   241   242   243   244   245   246   247   248