Skip to content

Instantly share code, notes, and snippets.

@ebovio
Created April 16, 2017 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebovio/58b901723174687b741aae972d6ed616 to your computer and use it in GitHub Desktop.
Save ebovio/58b901723174687b741aae972d6ed616 to your computer and use it in GitHub Desktop.
#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