For this part, I had to eventually cheat and look up the answers, below is the code that I found and somehow works, but why?
if x == 1 or x == 0:
return x*factorial(x - 1)
My questions are:
-Why does it return a 1? The "if" statement is false so it shouldn't execute in the first place, then it should go to the "else" statement.
-How did it get 24? If you follow the logic, it should return 12 as x*factorial(x - 1) -> 4*(4-1) -> 12