List three possibilities to consider if a function is not working.
First is something wrong with the arguments the function is getting; a precondition (The "precondition" states the situation under which the function operates correctly) is violated.
Second, something wrong with the function; a postcondition (the "postcondition" states what the function has accomplished when it terminates) is violated.
And third, something wrong with the return value or the way it is being used.
Comments