Page 141 - TP_Prime_v2.2_Class_6
P. 141

c.  Which of the following is used as a separator with print() function?

                        (i)  ,                                        (ii)  /t

                        (iii)  /n                                     (iv)  All of these

                     d.  Which of the following is true?

                        (i)  Comments are for programmers for better understanding of the program.

                        (ii)  Python Interpreter ignores comments.

                        (iii)  You can write multi-line comments in Python using triple quotes, either                       INTRODUCTION TO PYTHON
                             ‘’’ or """.

                        (iv)  All of these

                     e.  Which of the following symbol(s) is/are used for comments in Python?


                        (i)  //                                       (ii)  ‘’
                                                                                                                          139
                        (iii)  /**/                                   (iv)  #

                 2.  Write 'T' for true and 'F' for false.
                     a.  A variable can hold different types of values.                              ____________


                     b.  Comments are the most helpful part of any program.                          ____________

                     c.  The print() function allows to take input from the user.                    ____________

                     d.  The input() function is used to display the data on the screen.             ____________


                     Evaluation Time


                 1.  Fill in the blanks using the hints given below:

                         1991, Guido Van Rossum, interactive, script, underscore(_), variable, string, letter

                     a.  Python was created by ___________ in the year ___________.
                     b.  The two modes of writing Python code are ___________ and ___________.

                     c.  The storage unit of data is called a ___________.

                     d.  The default data type of input is ___________.
                     e.  A variable name can start with a ___________ or ___________.

                 2.  Short answer type questions.

                     a.  What is the use of the type() function?
                     b.  What is list data type?

                     c.  Write the names of any two separators which can be used with the print() function.
   136   137   138   139   140   141   142   143   144   145   146