Coursera programming assignment #2

The two functions needed in the assignment.