added factorial function
Merge pull request #1 from alexjaco/alexPrac3

added factorial function