Page 97 - TP-Play_V-2.0_Book-6
P. 97

2.  The statement using AND operator results true if ........................... .

                  a.  both operands are true                       b.  both operands are false

                  c.  either of the operands is true               d.  None of these

               3.  Which one of the following has the highest precedence in a logical expression?
                  a.  Multiplication                               b.  Exponential

                  c.  Parentheses                                  d.  All of these

               4.  Which of the following is true?

                  a.  Comments are for programmers for better understanding of the program.

                  b.  Python Interpreter ignores comments.
                  c.  Both a. & b.

                  d.  None of these


               5.  Which of the following symbol(s) is/are used for comments in Python?
                  a.  ‘’                   b.  /**/                c.  #                  d.  None of these

            B.  Write 'T' for true and 'F' for false.
               1.   The print() function allows to display output on the screen while a

                  program executes.                                                                     ...................
               2.   A compiler converts the entire source program into machine language
                  before executing.                                                                     ...................

               3.   The relational operators are used primarily in the expression evaluation to
                  make a decision.                                                                      ...................
               4.  A variable can hold different types of values.                                       ...................

            C.  Fill in the blanks using the words given in the help box.


                                         string, Guido van Rossum, false, input( ), assignment

               1.  Python was developed by ............................. .

               2.   The  ............................. operators  are  used to assign the value of the right expression to the left
                  operand.

               3.  A ............................. value is a collection of one or more characters put in single or double quotes.

               4.  The ............................. function allows to take user’s input while a program executes.

               5.  Logical OR operator returns ............................., if both operands are false.

            D.  Short answer type questions:
               1.  What is the use of variables in Python?

                  .....................................................................................................................................................................................................

                                                                   Introduction to Programming Python        97
   92   93   94   95   96   97   98   99   100   101   102