MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-Python-Course / factorial

Function factorial

Chapter 8/05_recursion.py:13–16  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

11'''
12
13def factorial(n):
14 if(n==1 or n==0):
15 return 1
16 return n * factorial(n-1)
17
18
19n = int(input("Enter a number: "))

Callers 1

05_recursion.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected