Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 153 - 2620_Birla Open Mind C-6
P. 153

    A.    Choose the correct option.

                            1.   What will be the output of the following expression?
                               22 % 3

                                     a.  7                                         b.  1
                                     c.  0                                         d.  5

                            2.  The statement using AND operator results true if           .

                                     a.  both expressions are true                 b.  both expressions are false

                                     c.  either of the expressions is true         d.  None of these
                            3.  Which one of the following has the highest precedence in a logical expression?

                                     a.  Addition                                  b.  Multiplication

                                     c.  Exponential                               d.  Parentheses

                            4.  Which of the following is true?
                                     a.  Comments are for programmers for better understanding of the program.

                                     b.  Python Interpreter ignores comments.

                                     c.  You can write multi-line comments in Python using triple quotes, either ‘’’ or “””.

                                     d.  All of these

                            5.  Which of the following symbol(s) is/are used for comments in Python?
                                     a.  //                                        b.  ‘’

                                     c.  /**/                                      d.  #

                     B.      Tick ( ) the correct statements and cross ( ) the wrong ones.

                            1.   The print() function allows to display output on the screen while a program executes.

                            2.   Assignment operators are used to perform arithmetic operations between two operands.

                            3.   The relational operators are used primarily in the expression evaluation to make a decision.

                            4.  A variable can hold different types of values.

                            5.  Comments are the most helpful part of any program.

                     C.    Answer the following questions:

                           1.   What is the use of variables in Python?

                           2.   Define the term data types.

                                                                                                              #Python 151

| 148 149 150 151 152 153 154 155 156 157 158 |