Skip to content

Commit

Permalink
Merge pull request TheAlgorithms#393 from purveshmakode24/master
Browse files Browse the repository at this point in the history
Add Fibonacci Series Using Recursion
  • Loading branch information
AnupKumarPanwar authored Oct 2, 2018
2 parents 0e76ee9 + 8fb4df5 commit da3af60
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Maths/fibonacciSeries.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Fibonacci Sequence Using Recursion

def recur_fibo(n):
if n <= 1:
return n
else:
return(recur_fibo(n-1) + recur_fibo(n-2))

limit = int(input("How many terms to include in fionacci series:"))

if limit <= 0:
print("Plese enter a positive integer")
else:
print("Fibonacci series:")
for i in range(limit):
print(recur_fibo(i))

0 comments on commit da3af60

Please sign in to comment.