Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

fibonacci python

# Implement the fibonacci sequence
	# (0, 1, 1, 2, 3, 5, 8, 13, etc...)
	def fib(n):
		if n== 0 or n== 1:
			return n
		return fib (n- 1) + fib (n- 2) 
Source by coderpad.io #
 
PREVIOUS NEXT
Tagged: #fibonacci #python
ADD COMMENT
Topic
Name
8+8 =