Page 67 - Computer - 7
P. 67

INFO RETENTION
                                                  INFO RETENTION

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

              1.   In Python, the simplest conditional statement is ______.
                  (a)  Choose              (b)  If                  (c)  Select             (d)  Test

              2.  An if statement within another if statement is called ______.
                  (a)  Blocked if          (b)  Stored if           (c)  Nested if          (d)  Caged if

              3.  What is the output of the following code segment?

                   X = 45
                   Y = 60

                   if (X > Y):

                      print(X + Y)
                   else:

                      print(Y – X)
                  (a)  60                  (b)  15                  (c)  45                 (d)  105

              4.  The symbol used to denote the beginning of a block of statements in Python is ______.

                  (a)  #                   (b)  { }                 (c)  ;                  (d)  :
              5.  Among the following, the incorrect variable name in Python is

                  (a)  Name1               (b)  123ABC              (c)  ABC123             (d)  ABC_123

          B.  Fill in the blanks with the correct answer.

              1.  The _________ statements are used to take decisions based on a test condition.

              2.  The starting of text at a position away from the margin is called _________.

              3.  The Nested if … else statement encloses an if statement within another _________ statement.
              4.  The if … elif … else statement is also called a _________.

              5.  The _________ function lets you accept data from the user and store it in a variable.

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

              1.  The input( ) function treats all data as string.                                           _______

              2.   Multi-line comments in Python are enclosed within triple quotes.                          _______
              3.  Every if statement must have a corresponding else statement.                               _______

              4.  Indentation of statements in the code makes it look colourful.                             _______
              5.  Conditional statements divide the flow of control of a program in different directions.    _______



                                                                                                              65
   62   63   64   65   66   67   68   69   70   71   72