If the flow of execution gets to the end of a function, the return value is None, which is not the absolute value of 0. >>> print absolute_value(0) None By the way, Python provides a built-in function called ab