Check an absolute value function for correctness

Here is what I created. My code is not working though. Would you mind helping me please?