Created
April 5, 2023 13:29
-
-
Save michaelsoltys/52e0b78ec935a84f3d1a7f9bf694e364 to your computer and use it in GitHub Desktop.
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 == 0: | |
return 0 | |
elif n == 1: | |
return 1 | |
else: | |
return fib(n-1) + fib(n-2) | |
print(fib(10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment