Last active
October 16, 2020 02:12
-
-
Save EdgardoDth/509535c7b6c165ce5f424fdb6f378aa2 to your computer and use it in GitHub Desktop.
Serie de fibonacci de un numero
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 fibonacci(x): | |
if x == 1: | |
return 1 | |
elif x == 0: | |
return 0 | |
return fibonacci(x - 1) + fibonacci(x - 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment