Page 133 - CodePilot V5.0 C6
P. 133

Components of the IDLE Shell Window
                 The IDLE shell window has two main components: the Menu Bar and the Prompt.

                     Menu Bar: Located at the top of the window, it offers options for file management, running
                    scripts and customising IDLE, including File, Edit, Shell, Debug, Options, Window and Help.
                     Prompt: This is the area to type Python code, marked by >>>, where results appear immediately
                    after each command.


                                  Menu Bar





                                    Prompt





                                                            Ask
                                                                      AGENT
                                                       OrangeAI
                  List some of the most popular applications or tools that were created using Python.

                          Study


                 SCRIPT MODE
                 Script Mode is used for writing longer Python programs that can be saved to your computer and
                 run later. IDLE provides a built-in text editor where you can write, edit and save Python scripts.

                 Creating a New File

                 In Python IDLE, creating a new file allows you to write and save your Python programs. To create
                 a new file, follow the given steps:


                                   1    Click on the File menu.


                              2    Click on the New File option.


                 A new window will open where you can start writing your Python code and save it for execution.
                                                                                  SHORT SIGN



                                                                                 To create a new file:
                                                                                      Ctrl + N





                 Writing and Saving a Program
                 Once you’ve created a new file, you can begin writing your Python program.





                                                                                                                  131
                                                                                              Python–Start to Code
   128   129   130   131   132   133   134   135   136   137   138