Is this correct for 8.3?


#1

My code keeps breaking and I don’t know how to check this anymore, so does this run correct?

def is_int(x):
absolute = abs(x)
rounded = round(absolute)
if absolute - rounded != 0:
return False
return True


#2

using abs() and round is a bit double, isn’t it?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.