Created
August 27, 2016 10:33
-
-
Save brettfreer/7855960247d078e60d961ea6fe836ea4 to your computer and use it in GitHub Desktop.
Return fibonacciNumber n
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fibonacci(n): | |
if n < 2: | |
return n | |
return fibonacci(n-2) + fibonacci(n-1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment