Python Snippets - 1(Arithmetic Operators)
Arithmetic operators are used with numeric values to perform mathematical operations. Python supports the following arithmetic operators
⑴ + Addition: To add two numbers i.e. a + b
⑵ - Subtraction: To find difference of two numbers i.e. a - b
⑶ * Multiplication: Product of two numbers e.g. 2 × 3 = 6
⑷ / Division: To find quotient in division i.e. returning the floating-point result of the computation
⑸ % Modulus: To remainder in division method
⑹ // Floor Division or Intger Division i.e. rounds the result down to the nearest whole number
⑺ ** Exponentiation e.g. find 12² = 144
The above said are also called binary arithmetic operator because it requires two operands.