This code is wrong; the correct version is posted below, but I don't understand the reasoning behind why this doesn't work. It seems logically structured.

```
def absolute_value(x): #define a function "absolute_value"
    """returns the absolute value of x.
    """
    if x < 0:
        return x = -x
    else:
        return x

```

This is the right code:

```
def absolute_value(x): #define a function "absolute_value"
    """returns the absolute value of x.
    """
    if x < 0:
        x = -x
    return x

```