I'm pretty new to the python programming and I am currently trying to create a factorial function which I have, but now I an trying to get it to list the positive integer n as input and then computes and outputs, in separate lines, 1!, 2!, 3!, ..., (n-1)!, n! and so. I have come up with a code that outputs n! already.
def factorial(n):
if n <= 1:
return 1
return n*factorial(n-1)
any help will be greatly appreciated