Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
''
&
#x27;
12
13
def
factorial(n):
14
if
(n==1 or n==0):
15
return
1
16
return
n * factorial(n-1)
17
18
19
n = int(input(
"Enter a number: "
))
Callers
1
05_recursion.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected