Programming assignment 2 baseline

Created functions for programming assignment 2.