Page 104 - TP_Pluse_V2.2_Class_6
P. 104

PROGRAMMING IN PYTHON


                  Python has two basic programming modes—Script Mode and Interactive Mode.


                       Working in Interactive Mode
                  Interactive  Mode  is  a command  line shell which gives  immediate  result for each  command.  In
                  Interactive mode,  we type one command at a time. Python executes the given command and gives
                  the output.

                  Follow these  steps  to  start  Python  and  work  in  Interactive
                  Mode:
                  Step 1:   Click on Start button.

                  Step 2:   Scroll down the  list  of programs  and click  on
                          Python 3.12 folder.
                  Step 3:  Click on IDLE (Python 3.12 64-bit).

                  The main IDLE window appears. IDLE stands for Integrated
                  Development and Learning Environment. It is a code editor                   Opening Python
                  which helps you to write and execute Python programs in the editor itself.

                  Components of Python Window

                  There are two components of Python IDLE window:
                      Menu Bar: The Menu Bar of Python IDLE window is similar to the Menu Bar of other programs. It has
                    various menus such as File, Edit, Shell, Debug, Options, Window and Help.

                      Prompt: You will see a blinking cursor after the symbol (>>>) in the window. This is known as the
                    prompt. The prompt allows the user to enter commands directly into Python and get an output
                    instantly by pressing the Enter key.

                                                    Menu bar







                                                                                                    Prompt

                                                                                       Components of IDLE

                  Type the commands at the prompt
                  and  you  will immediately  get  the
                  results. Simply, type 3 + 3 and press
                  the Enter key. The result 6 appears
                  on the screen. Try more values and
                  see what happens.

                                                                                Typing commands

                  102   Plus (Ver. 2.2)-VI
   99   100   101   102   103   104   105   106   107   108   109