PyCalc


     Python's interpreter acts as if its a  calculator.When the python shell is opened it usually displays >>> (three less than) symbol which indicates that the interpreter is ready to get the operation it has to perform.
     
     The next important feature is . . . which indicates the next line to be included for the processing.Thus the python shell can be used to perform basic calculations however if the calculations are large enough then it is better to use the script since the interpret will actually keep the track of the information only until it is open and when it is closed it deletes whatever the process had been carried out.

     # is a symbol which is used in order to place a comment and hence if you copy and paste the previous line in the interpreter the interpreter will acknowledge the line as the comment.

     + symbol for addition.if + for two integers then simple addition will be done and if "plus "+"is used between strings then concatenation will be done"

      - don't have any special functionality as + however can be simply used for addition.

     * is used for multiplication.if we have'**' then we would be able to get x raised to the power n (xn).

     / always returns the quotient with a decimal point and // returns an integer with a floor value i.e. it returns the integer part alone and removes the decimal part irrespective of how large the numbe after the decimal point is.



     Hoooooo this is how we can use the interpreter as a calculator.

Comments

Popular Posts