Chapter 4. Operators and expressions
Operators are the symbols which tells the python interpreter to do some mathematical or logical operation. Few basic examples of mathematical operators are given below:
>>> 2 + 3
5
>>> 23 - 3
20
>>> 22.0 / 12
1.8333333333333333
To get floating result you need to the division using any of operand as floating number. To do modulo operation use % operator
>>> 14 % 3
2