"""Compute the absolute value of a number"""

# here is a faulty version of a function for computing the absolute
# value of a number.
# what is the problem?

def faulty_absolute_value(x):
    if x < 0:
        return -x
    elif x > 0:
        return x

# here's a version that does the right thing:

def absolute_value(x) :
    if x < 0 :
        return -x
    else :
        return x