input: Write a function to understand recursion in Python by defining a recursive function to calculate the factorial of a given number. The function should return the factorial of the given number. If the input number is 1, the function should return 1. Otherwise, it should return the product of the number and the factorial of the number minus one. If the input number is negative, return an appropriate message indicating that factorial is not defined for negative numbers.
  assert factorial(5)==120
  assert factorial(10)==3628800
  assert factorial(1)==1
  assert factorial(-1)=='Factorial is not defined for negative numbers'
  assert factorial(0)=='Factorial is not defined for zero'
output: def factorial(n):
      if n < 0:
          return 'Factorial is not defined for negative numbers'
      elif n == 0:
          return 'Factorial is not defined for zero'
      elif n == 1:
          return 1
      else:
          return n * factorial(n - 1)