input: Write a function that demonstrates a simple example of recursion in Python by calculating the factorial of a given number.
  def factorial(n):
     if n == 1:
        return 1
     else:
        return n * factorial(n - 1)
  
  assert factorial(5)==120
  assert factorial(4)==24
  assert factorial(1)==1
  assert factorial(3)==6
  assert factorial(0)==None
output: def factorial(n):
     if n == 0:
        return 1
     elif n == 1:
        return 1
     else:
        return n * factorial(n - 1)