Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 164 - 2632_CodeMind
P. 164

    You will get the following output:

                         Output                                                                          Factopedia

                      Input the sides of the triangle:
                      A: 2.3
                      B: 5.3
                      C: 9.5
                      Scalene triangle

                                                                                                    Approximately,
                               Let’s BaCk-uP                                                       1.4% of all websites
                                                                                                   on the Internet use
                           A function is a block of organised and reusable code                   Python as a server-
                          designed to perform a single or related set of actions.                  side programming

                           Python functions can be categorised into built-in functions                 language.
                          and user-defined functions.

                           User-defined functions are created by the user according to
                          the need of the program.

                           A sequence of characters that is enclosed or surrounded by
                          single (' '), double (" "), or triple (''' ''') quotes is known as a
                          string.
                                                                                                  If you get to the IDLE
                           Escape sequences or characters are used to represent
                          special characters that cannot be directly inserted into a              and type in import
                          string.                                                                 antigravity, it opens
                                                                                                  up a web page with
                           Python uses the + operator for concatenation and the *
                          operator for replication.                                                a comic about the
                                                                                                  antigravity module.

                                                                                                      The name of
                                                                                                      the Python
                                                                                                     programming
                                                                                                    language comes
                                                                                                    from an old BBC
                                                                                                   television comedy
                                                                                                  sketch series called
                                                                                                    Monty Python's
                                                                                                     Flying Circus.

                                                                                          Functions and String in Python  163

| 159 160 161 162 163 164 165 166 167 168 169 |