Skip to content

Calculate Factorial

Andrew Burke edited this page Apr 3, 2024 · 6 revisions
def factorial(n):
	result = 1
	for num in range(1, n+1):
		result *= num
	return result
	
Clone this wiki locally