Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

fibonacci

def fibonacci(n):
    if n == 0:
        return 0
    elif n == 1:
        return 1
    return fibonacci(n - 1) + fibonacci(n - 2)
Source by dbader.org #
 
PREVIOUS NEXT
Tagged: #fibonacci
ADD COMMENT
Topic
Name
2+4 =