I did some digging around in the Q & A forum and figured out how to do this exercise but there is a line of code that I'm not sure what it actually does. If somebody could explain it to me I would appreciate it.
Here is the line of code:
x = x * factorial(x-1)
if it helps here is the entire exercise. The indentations are present. The code works fine I just would like to know what that one line of code does (shown above ^^^^). Thank you guys.
def factorial(x): if x > 0: x = x * factorial(x-1) elif x ==0: return 1 return x