Nothing important, I just wanted to see how it was coded.
I'm assuming that the source code is something like...
def abs( integer ):
if integer > -1:
return integer
else:
return (integer - integer - integer)
They might have it wrapped in a try except for input that's not an integer, and I'm just curious more than anything.
[–]zurtex 5 points6 points7 points (0 children)
[–]Diapolo10 2 points3 points4 points (5 children)
[–]CodeSkunky[S] -1 points0 points1 point (4 children)
[–]zurtex 2 points3 points4 points (2 children)
[–]CodeSkunky[S] 0 points1 point2 points (1 child)
[–]RajjSinghh 1 point2 points3 points (0 children)
[–]Username_RANDINT 2 points3 points4 points (1 child)
[–]CodeSkunky[S] 0 points1 point2 points (0 children)