completes factorial practice using for loop and recursion