Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 131 - 2612_Digimind
P. 131

    Output

                      Enter the Length 10
                      Enter the Width 4
                      Area of the Rectangle is :  40

                            Hashtag

                          #Operator: An operator is a symbol that triggers a computation action
                          #Keywords: Keywords are the reserved words which are used for some specific purposes

                          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 triggers a computation action.
                       ▶  Data types are used to define the type of data.

                     1.  Tick ( ) the correct option.
                        a.   Riya is writing a Python program and wants to store her name as text. Which Python data type
                           should she use?

                            (i)  Integer                                      (ii)  Float
                           (iii)  String                                      (iv)  Boolean

                        b.  Sameer stores coordinates (5, 7) which should not change later. Which data type is most suitable?
                            (i)  List                                         (ii)  Tuple

                           (iii)  Set                                         (iv)  Dictionary

                        c.   A student adds an integer and a float in Python and notices that the result is a float without using
                           any conversion function. What type of conversion is this?

                            (i)  Explicit conversion                          (ii)  Implicit conversion
                           (iii)  Manual conversion                           (iv)  Logical conversion

                                                                                        Tokens and Data Types in Python  129

| 126 127 128 129 130 131 132 133 134 135 136 |