On beyond strings


#1

Hello,

Why does : def distance_from_zero(arg):
print abs(arg)
return abs(arg)

return : 10 ? (What is the function abs ?)

Thank you :slightly_smiling:


#2

Hi the function abs() return the absolute value of a number.
Example

print abs(-54)

#Output
54 
print abs(-10)

#Output
10

print abs(20)

#Output
20

#3

Thanks ! I didn't see that the explanation was a bit further in the lesson :smiley: