What are Preconditions and Postconditions?
One way to specify such requirements is with a pair of statements about the function.
The precondition statement indicates what must be true before the function is called.
The postcondition statement indicates what will be true when the function finishes its work.