Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 85 - 2606_PlugGPT_C6_Flipbook
P. 85

    SAVING A PYTHON PROGRAM

                     To save a Python program, follow the steps given below:

                           1  Click on the File menu.

                                                                                   3  Type the name of the
                                                                                  file in the File name: box.

                           2  Click on Save option.              4  Click on the Save button.

                     The file will be saved with the .py extension and ready to be executed as a Python script. All
                     Python files are saved with a .py extension, which indicates that the file contains Python code. This
                     allows the Python interpreter to recognise and execute the script
                     correctly.                                                                    To save a program:
                                                                                                Short key

                               EXECUTING A PYTHON PROGRAM

                     To run a Python program, follow the steps given below:                            Ctrl +     S

                               1  Click on the            2  Click on the Run
                              Run menu.                   Module option.

                                                                                                Short key  To execute a
                                                                                                   program:

                                                                                                            F5

                     The output will be displayed in the Python Shell window.

                                                                                                 Introduction to Python  83

| 80 81 82 83 84 85 86 87 88 89 90 |