Page 11 - Modular v1.1 Pyhton
P. 11

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
                 Script Mode


                 The Interactive Mode does not save the commands entered by the user
                 in the form of a program. The Script Mode saves the commands entered
                 by the user in the form of a program. To understand the working of Script
                 Mode, we have divided the process into four parts. Let us discuss these.

                 Creating a New File


                 Follow these steps to create a new file:

                 Step 1:    Open the Python IDLE window.
                 Step 2:    Click on the File menu. A drop-down menu appears.                  Selecting New File option

                 Step 3:      Click on the New File option. A new editor window with a blank file will appear on the
                            screen.

                 Writing a Program

                 Type the program code in Python window.









                                                       Typing Python program code

                                                                                         Introduction to Python    9
   6   7   8   9   10   11   12   13   14   15   16