Page 101 - 2403_Trackpad_V5.1_C6_Fb
P. 101

Some more arithmetic operators are:
                    (–) Subtraction operator: It subtracts the right-hand operand from the left-hand operand.
                    (*) Multiplication operator: It multiplies values on either side of the operator.
                    (/) 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.





















                        2  Click on Save option.     3  Type the name of the file in   4  Click on the Save button.
                                                    the File name: box.

                 By default, the file will be saved with the .py extension 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  Ctrl +  S

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



                         1  Click on the      2  Click on the Run
                         Run menu.           Module option.                                    To execute a
                                                                                            Short key  program:  F5













                                                                                             Introduction to Python  99
   96   97   98   99   100   101   102   103   104   105   106