Why does the function on top not work for giving me the factorial but the bottom function does work?

```
Replace this line with your code.
def factorial(n):
if n == 0:
return 1
else:
return factorial(n)
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)
```