Article 017
In Python, we have multiple operators to perform desired operations. One such operator type is the arithmetic operator. As the name suggests arithmetic operators are used to perform arithmetic operations such as add, subtract, divide etc. For better understanding, I have listed all the arithmetic operators below along with the example.
'+' Addition 9 + 5 will return 14
'-' Subtract 9 - 5 will return 4
'*' Multiplication 9 * 5 will return 14
'/' Division 9 / 5 will return 1.8
'%' Modulus 9 % 5 will return 4 i.e. the remainder value
'**' Exponentiation 9 ** 5 will return 59049
'//' Floor Division 9 // 5 will return 1 i.e. the quotient
The above illustrations will be helpful to understand all the operators inside the arithmetic operator. Arithmetic operators are simple to understand as they are very relatable to our studies in school and college. In the next article, we will discuss the assignment operators. Till then, happy learning.