Page 101 - Computer - 8
P. 101

INFO RETENTION
                                                  INFO RETENTION


          A.   Select the correct option for each of the following statements.

              1.  Loops belong to which category of statements?
                  (a)  Conditional         (b)  Selection           (c)  Iterative          (d)  Sequential

              2.  Which loop is known as the definite loop?
                  (a)  For                 (b)  While               (c)   If … Else         (d)  Do while

              3.  The variable used in the test expression of a loop is called the ______.
                  (a)  Condition variable  (b)  Control variable    (c)  Test variable      (d)  loop variable

              4.  The second argument of the range function is ______.
                  (a)  start_val           (b)  step_val            (c)  end_val            (d)  stop_val

              5.  The jump statement in Python is
                  (a)  Jump                (b)  GoTo                (c)  Break              (d)  End


          B.  Fill in the blanks with the correct answer.

              1.  Looping statements are also called _________ statements.
              2.  _________ and _________ are the two types of loops in Python.

              3.  The counter variable gets updated automatically in the _________ loop.
              4.  The _________ in the Range( ) function is compulsory.

              5.  The _________ argument of Range( ) function is used to increment or decrement the counter
                  variable.

          C.  Write ‘T’ for True and ‘F’ for False statement.

              1.  The break statement restarts the loop.                                                     _______
              2.  The While loop gets executed a specified number of times.                                  _______

              3.  The range( ) function can be used to generate a list of numbers.                           _______
              4.   The For loop is a definite loop.                                                          _______

              5.  While loop without a correct updation statement becomes an infinite loop.                  _______

          D.  Answer the following questions.
              1.  What are Iterative statements?

              2.  What is the difference between For and While loop in Python?

              3.  Explain the various ways in which the range( ) function can be used.
              4.  What are Jump statements? Explain the jump statements available in Python.
              5.  Write the syntax of the various loops available in Python.



                                                                                                              99
   96   97   98   99   100   101   102   103   104   105   106