Created
April 16, 2017 19:26
-
-
Save ebovio/58b901723174687b741aae972d6ed616 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
#Problem6 | |
def fib(n): | |
if n == 0: | |
return 0 | |
elif n == 1: | |
return 1 | |
else: | |
return fib(n-1) + fib(n-2) | |
#MainProgramBelow | |
n=int(input("Write the number you want to know the fibonacci number of:")) | |
print("The fibonacci value of", n ,"is:", fib(n)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment