Solution Review: Factorial of a Number
This lesson will explain the solution to the factorial exercise in the previous chapter lesson.
We'll cover the following...
We'll cover the following...
Solution
Explanation
The function starts with handling the edge cases. We know that for n==0 and n==1, we need to return 1. Therefore, we write an if statement with an or in between the ...