Write a Python program to find the factorial of a number.
def factorial(n):
return 1 if n == 0 else n * factorial(n-1)
Example:
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.