Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 281 Bytes

recurisivity.md

File metadata and controls

12 lines (11 loc) · 281 Bytes

Recursivity is a programming techniques that is similar to [[loop]] where a function call itself recursively (multiple times)

def factorial(n):
	"""
	Compute the factorial of a number
	"""
	if n == 0 or n == 1: 
		return 1 
	else: 
		return n * factorial(n - 1)