Page 122 - Computer Class 08
P. 122

Let us now learn how to use the script mode.


             Creating First Program in Script Mode

             We can create a simple program in Python to a message on the screen. There are mainly
             two steps of creating a program. These are :
             8  Creating and writing program
             8  Executing or running the program

             Creating and Writing Program


               Let’s  Learn...                                 2              3
               Let’s
                      Learn...

             To create and write a program.
             1.  Start Python IDLE    .
             2.  Click on the File  .

             3.  Click on New     File .
                  A window will appear.





                 5
                                                                           4.  Type  the  commands  as  per  your
                                                                                requirement.
                                                                           5.  Click on File.
                                6                                          6.  Click on Save As   .

                                                                                The  Save  As  dialog  box  will
                                                                                appear.








             7.  Type  the  name  of  the  file  in  the
                  File name box.
             8.  Click on the Save     button.
                  The  file  will  be  saved  with  .py
                  extension.                                                        7


                                                                                                               8









              Computer-8            122
   117   118   119   120   121   122   123   124   125   126   127