For example the 'x'in

if ans*ans*ans != abs(x):

abs(x) where x is an argument for the function abs()

For example ...

x = -123
print(x)
print(abs(x))

From the manual ...
abs(x)
Return the absolute value of a number. The argument may be a plain or long integer or a floating point number. If the argument is a complex number, its magnitude is returned.

See also ...
https://www.daniweb.com/software-development/python/threads/20774/starting-python#post104853

commented: Thank you very much +0