Page 123 - Trackpad_V1_Book 6_Flipbook
P. 123

(/) Division operator: It divides the left-hand operand by the right-hand operand.
                      (%) Modulus operator: It divides the left-hand operand by the right-hand operand and returns
                     the remainder.
                      (**) Exponentiation operator: It performs exponential (power) calculation on operands.
                      (//) Floor or Integer division operator: It divides and cuts the fractional part from the result.
                 We will learn about more operators in the next class.




                          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.

                 By default, the file will be saved in the Python folder in the C: drive,
                 but you can change the location if you desire.
                                                                                               To save a program:

                          EXECUTING A PYTHON PROGRAM                                        Short key

                 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.                                          To execute a
                                                                                            Short key  program:  F5













                                                                                             Introduction to Python  121
   118   119   120   121   122   123   124   125   126   127   128