For integers, the previously discussed operations +, -, * and are defined **. The division operationfor integers returns a value of type float. Also, the exponentiation function returns a value of type float if the exponent is a negative number.
But there is also a special operation of integer division, performed by discarding the fractional part, which is denoted by //. It returns an integer: the integer part of the quotient. For example:
>>> 17 // 3
5
>>> -17 // 3
-6
Another operation close to it: this is the operation of taking the remainder of division, denoted by %:
>>> 17 % 3
2
>>> -17 % 3
1