Page 97 - TP_V5.1_C7_fb
P. 97

REVISIT



                   ▶  A token is the smallest element of a Python program that is meaningful to the interpreter.
                   ▶  Identifiers are the names given to variables, functions and arrays.
                   ▶  Keywords are reserved words that are used for some specific purposes.
                   ▶  Constants or literals are the fixed values that do not change during the execution of a program.
                   ▶  An operator is a symbol that is used to perform some specific operations.
                   ▶  Data types are used to define the type of data.










                 1.  Tick ( ) the correct option.
                    a.  Which of the following is not a keyword in Python language?

                        (i)  value                                  (ii)  True
                       (iii)  break                                 (iv)  None of these

                    b.  In Python, the 3**5 expression will return _______________.
                        (i)  243                                    (ii)  15
                       (iii)  125                                   (iv)  error

                    c.  Which of the following is an example of float data type?
                        (i)  3257                                   (ii)  -3.257

                       (iii)  Shweta                                (iv)  c=3+4j
                    d.  When a parenthesis is missing in print statement, which type of error occurs?
                        (i)  Logical Error                          (ii)  Syntax Error

                       (iii)  Mathematical Error                    (iv)  None of these
                    e.   A list is a collection of data elements separated by _______________ and enclosed within
                      _______________.
                        (i)  , and {}                               (ii)  . and \\

                       (iii)  , and []                              (iv)  , and ()
                 2.  Fill in the blanks using the words from the help box.


                                         Semantic, Constant, Tuple, Data type, Identifier

                    a.  _______________ is the fixed value that does not change during the execution of a program.
                    b.  _______________ is the name given to variables, functions and arrays.
                    c.  _______________ is a collection  of data  elements  separated  by  comma  and enclosed  within
                      parentheses.
                    d.  Logical errors are also known as _______________ errors.
                    e.  _______________ is used to define the type of value a variable can contain.



                                                                                    Tokens and Data Types in Python  95
   92   93   94   95   96   97   98   99   100   101   102