Last active
November 2, 2019 01:34
-
-
Save lachlan-eagling/433fddda79a95505fc5769096660a411 to your computer and use it in GitHub Desktop.
Basic Recursive Fibonacci Sequence
This file contains 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 fib(n): | |
if n < 2: | |
return n | |
return fib(n - 1) + fib(n - 2) | |
fib(35) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment