Don't check the pos
directly, instead check if a.distance(40.0, 80.0) < 1.0
or some small threshold.
Alternative: after you move the turtle or before you check its position, you can round
the returned coordinates so that they snap to exact numbers.
>>> round(40.01)
40.0