Round a floating-point number down to the nearest integer?

Simple

print int(x)

will work as well.


One of these should work:

import math
math.trunc(1.5)
> 1
math.trunc(-1.5)
> -1
math.floor(1.5)
> 1
math.floor(-1.5)
> -2