Programming Assignment 2

Two functions for programming assignment 2