Page 70 - ModularV1.1 _c8_flipbook
P. 70

Object-Oriented: Python supports object-oriented programming concepts of classes and
                     objects. The programs are built around objects that combine both data and functionality.
                      Interpreted: The Python interpreter executes the code one line at a time. Internally, Python
                     converts the source program into an intermediate form called bytecode and then translates
                     this to run on the specific platform.

                      Interactive mode: Python IDLE (Integrated Development and Learning  Environment)
                     comprises of Python shell and Python Editor. Python shell is an interactive interpreter window,
                     where Python code is typed at >>> prompt and run and the shell responds with the result.

                      Cross-platform: A Python program can run on any platform without making changes to it
                     which means that the same program will run on Windows, Linux, Macintosh, etc.
                  Python is a general-purpose, dynamic, interpreted, interactive, high-level, multi-platform and
                  object-oriented programming language.

                      HOW TO USE PYTHON IDLE

                  Step 1  Click on Start → All programs → Python 3.7 → IDLE (Python 3.7 32-bit)

                  Step 2  This will open the main IDLE window (also known as Interpreter or shell window).
                  Step 3  The IDLE window has two parts: Menu bar and Prompt (>>>)
                                                                         Menu bar







                                Prompt

                                                             Python IDLE Window (Prompt)
                  My First Python Program

                  Python prompt allows you to enter commands directly and get the output instantly by pressing
                  the Enter key.

                  To write a program, perform the following steps:
                  Step 1  Write the following print statement at the prompt

                          >>> print ("Hello World.")
                  Step 2  Press the Enter key.











                                                            Displaying output

                  You will see Hello World. written on the screen.



                  68      Modular (Ver. 1.1)-VIII
   65   66   67   68   69   70   71   72   73   74   75