I put this one into an IDE trying to see how it works. It looks like it loops all the way through then stores the numbers till the end, then does all the math? I figured it would run until it hit 0, then just return 0 since anything * 0 = 0

So I'm just asking if someone can explain what is going on in more depth for me thank you.

```
def factorial(x):
if x == 0:
return 1
elif x > 0:
return x * factorial(x-1)
```