Ad
Code
Diff
  • def factorial(n):
        if n == 1:
            return 1
        else:
            return n * factorial(n-1)
    • def factorial(n):
    • # your code goes here
    • return
    • if n == 1:
    • return 1
    • else:
    • return n * factorial(n-1)