Created
October 25, 2020 16:13
-
-
Save fuwiak/9a69e35bb19d31abd0504b6db1ae55cc 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 fibonacci(n): | |
def recur_fibo(n): | |
if n <= 1: | |
return n | |
else: | |
return(recur_fibo(n-1) + recur_fibo(n-2)) | |
if n <= 0: | |
print("Plese enter a positive integer") | |
else: | |
for i in range(n): | |
print(recur_fibo(i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment