Created two functions

Completed assignment 2