Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/subbarayudu-j/TheAlgorithms-Python
/ factorial
Function
factorial
project_euler/problem_20/sol1.py:2–6 ·
view source on GitHub ↗
(n)
Source
from the content-addressed store, hash-verified
1
# Finding the factorial.
2
def
factorial(n):
3
fact = 1
4
for
i in range(1,n+1):
5
fact *= i
6
return
fact
7
8
# Spliting the digits and adding it.
9
def
split_and_add(number):
Callers
4
sol1.py
File · 0.70
main
Function · 0.70
combinations
Function · 0.50
lattice_paths
Function · 0.50
Calls
no outgoing calls
Tested by
no test coverage detected