Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 132 - 2612_Digimind
P. 132

    d.  Rahul creates two variables named Total and total. Python treats them as different variables. Why?
                             (i)  Python is case-sensitive

                            (ii)  Python ignores case

                            (iii)  Python converts all names to lowercase
                            (iv)  Python treats uppercase as constants

                         e.   Meera wants to store only unique roll numbers and does not care about order. Which data type
                            should she use?
                             (i)  List                                         (ii)  Tuple

                            (iii)  Dictionary                                  (iv)  Set

                      2.  Fill in the blanks using the words from the help box.

                                                    Token, Int(), Boolean, Syntax, Valid

                         a.   A set of _______________ characters recognised by a programming language is called a character
                            set.

                         b.  The literal value True belongs to the _______________ data type.

                         c.  Errors that occur due to violation of Python grammar rules are called _______________ errors.

                         d.  The function _______________ is used for explicit type conversion.

                         e.  A _______________ is the smallest meaningful element of a Python program.

                      3.  Write 'T' for true and 'F' for false.

                         a.  Uppercase and lowercase letters are treated as the same in Python identifiers.

                         b.  The set of valid characters recognised by a programming language is called a character set.

                         c.  Constants are values that do not change during the execution of a program.

                         d.  Float data types store only whole numbers without decimal points.

                         e.  Keywords in Python can be used as identifiers if written in lowercase.

                      4.  Think and answer.

                         a.  What is Python character set?

                          _______________________________________________________________________________

                          _______________________________________________________________________________

                          _______________________________________________________________________________

                      130   Premium Edition-VII

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