Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 150 - 2633 Trackpad Pro V5.1 Class 7
P. 150

    Output

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

                                        Imagine, comments in Python are secret messages from a wise mentor. What advice or tips
                                        would you leave in your code for future programmers to discover?

                             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.  Which of the following is a valid identifier in Python?
                             (i)  1var                                    (ii)  var_1
                            (iii)  Var^2                                 (iv)  Var 1

                         b.  Which logical operator is used when both logical conditions are true?
                             (i)  and                                     (ii)  not

                            (iii)  or                                    (iv)  None of these

                      148   Premium Edition-VII

| 145 146 147 148 149 150 151 152 153 154 155 |