LogiQuest
Back to Functions
21

What is the output of the following code?

def fact(n):
    return 1 if n <= 1 else n * fact(n - 1)
print(fact(6))
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.